le_riPin_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_riPin Ring Indicator Signal
14  *
15  * @ref le_riPin_interface.h "API Reference"
16  *
17  * <HR>
18  *
19  * The Ring Indicator pin is used to allow the module to wake up a host device.
20  *
21  * @section c_riPin_binding IPC interfaces binding
22  *
23  * All the functions of this API are provided by the @b modemService app.
24  *
25  * Here's a code sample binding to modem services:
26  * @verbatim
27  bindings:
28  {
29  clientExe.clientComponent.le_riPin -> modemService.le_riPin
30  }
31  @endverbatim
32  *
33  * @section c_riPin_usage Ring Indication signal
34  *
35  *
36  * The RING pin can be configured to notify a host device with different timing of pulse signals for
37  * different module activities.
38  *
39  * - le_riPin_AmIOwnerOfRingSignal() function checks whether the application core is the current
40  * owner of the Ring Indicator signal.
41  * - le_riPin_TakeRingSignal() function takes control of the Ring Indicator signal.
42  * - le_riPin_ReleaseRingSignal() function releases control of the Ring Indicator signal.
43  *
44  * - le_riPin_PulseRingSignal() function sets the ring signal high for configurable duration of time
45  * before lowering it.
46  *
47  * <HR>
48  * Copyright (C) Sierra Wireless Inc.
49  */
50 /**
51  * @file le_riPin_interface.h
52  *
53  * Legato @ref c_riPin include file.
54  *
55  * Copyright (C) Sierra Wireless Inc.
56  */
57 
58 #ifndef LE_RIPIN_INTERFACE_H_INCLUDE_GUARD
59 #define LE_RIPIN_INTERFACE_H_INCLUDE_GUARD
60 
61 
62 #include "legato.h"
63 
64 // Internal includes for this interface
65 #include "le_riPin_common.h"
66 /** @addtogroup le_riPin le_riPin API Reference
67  * @{
68  * @file le_riPin_common.h
69  * @file le_riPin_interface.h **/
70 //--------------------------------------------------------------------------------------------------
71 /**
72  * Type for handler called when a server disconnects.
73  */
74 //--------------------------------------------------------------------------------------------------
75 typedef void (*le_riPin_DisconnectHandler_t)(void *);
76 
77 //--------------------------------------------------------------------------------------------------
78 /**
79  *
80  * Connect the current client thread to the service providing this API. Block until the service is
81  * available.
82  *
83  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
84  * called before any other functions in this API. Normally, ConnectService is automatically called
85  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
86  *
87  * This function is created automatically.
88  */
89 //--------------------------------------------------------------------------------------------------
91 (
92  void
93 );
94 
95 //--------------------------------------------------------------------------------------------------
96 /**
97  *
98  * Try to connect the current client thread to the service providing this API. Return with an error
99  * if the service is not available.
100  *
101  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
102  * called before any other functions in this API. Normally, ConnectService is automatically called
103  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
104  *
105  * This function is created automatically.
106  *
107  * @return
108  * - LE_OK if the client connected successfully to the service.
109  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
110  * bound.
111  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
112  * - LE_COMM_ERROR if the Service Directory cannot be reached.
113  */
114 //--------------------------------------------------------------------------------------------------
116 (
117  void
118 );
119 
120 //--------------------------------------------------------------------------------------------------
121 /**
122  * Set handler called when server disconnection is detected.
123  *
124  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
125  * to continue without exiting, it should call longjmp() from inside the handler.
126  */
127 //--------------------------------------------------------------------------------------------------
129 (
130  le_riPin_DisconnectHandler_t disconnectHandler,
131  void *contextPtr
132 );
133 
134 //--------------------------------------------------------------------------------------------------
135 /**
136  *
137  * Disconnect the current client thread from the service providing this API.
138  *
139  * Normally, this function doesn't need to be called. After this function is called, there's no
140  * longer a connection to the service, and the functions in this API can't be used. For details, see
141  * @ref apiFilesC_client.
142  *
143  * This function is created automatically.
144  */
145 //--------------------------------------------------------------------------------------------------
147 (
148  void
149 );
150 
151 
152 //--------------------------------------------------------------------------------------------------
153 /**
154  * Check whether the application core is the current owner of the Ring Indicator signal.
155  *
156  * @return
157  * - LE_OK The function succeeded.
158  * - LE_FAULT The function failed.
159  * - LE_BAD_PARAMETER Bad input parameter.
160  */
161 //--------------------------------------------------------------------------------------------------
163 (
164  bool* amIOwnerPtr
165  ///< [OUT] true when application core is the owner of the Ring Indicator signal,
166 );
167 
168 //--------------------------------------------------------------------------------------------------
169 /**
170  * Take control of the Ring Indicator signal.
171  *
172  * @return
173  * - LE_OK The function succeeded.
174  * - LE_FAULT The function failed.
175  * - LE_UNSUPPORTED The platform does not support this operation.
176  */
177 //--------------------------------------------------------------------------------------------------
179 (
180  void
181 );
182 
183 //--------------------------------------------------------------------------------------------------
184 /**
185  * Release control of the Ring Indicator signal.
186  *
187  * @return
188  * - LE_OK The function succeeded.
189  * - LE_FAULT The function failed.
190  * - LE_UNSUPPORTED The platform does not support this operation.
191  */
192 //--------------------------------------------------------------------------------------------------
194 (
195  void
196 );
197 
198 //--------------------------------------------------------------------------------------------------
199 /**
200  * Set the Ring Indicator signal to high for configurable duration of time before lowering it.
201  *
202  */
203 //--------------------------------------------------------------------------------------------------
205 (
206  uint32_t duration
207  ///< [IN] [IN] Duration in ms
208 );
209 
210 /** @} **/
211 
212 #endif // LE_RIPIN_INTERFACE_H_INCLUDE_GUARD
le_result_t
Definition: le_basics.h:46
le_result_t le_riPin_AmIOwnerOfRingSignal(bool *amIOwnerPtr)
le_result_t le_riPin_TakeRingSignal(void)
void le_riPin_PulseRingSignal(uint32_t duration)
le_result_t le_riPin_TryConnectService(void)
#define LE_FULL_API
Definition: le_apiFeatures.h:40
le_result_t le_riPin_ReleaseRingSignal(void)
LE_FULL_API void le_riPin_SetServerDisconnectHandler(le_riPin_DisconnectHandler_t disconnectHandler, void *contextPtr)
void le_riPin_ConnectService(void)
void le_riPin_DisconnectService(void)
void(* le_riPin_DisconnectHandler_t)(void *)
Definition: le_riPin_interface.h:75