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 
65 //--------------------------------------------------------------------------------------------------
66 /**
67  * Type for handler called when a server disconnects.
68  */
69 //--------------------------------------------------------------------------------------------------
70 typedef void (*le_riPin_DisconnectHandler_t)(void *);
71 
72 //--------------------------------------------------------------------------------------------------
73 /**
74  *
75  * Connect the current client thread to the service providing this API. Block until the service is
76  * available.
77  *
78  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
79  * called before any other functions in this API. Normally, ConnectService is automatically called
80  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
81  *
82  * This function is created automatically.
83  */
84 //--------------------------------------------------------------------------------------------------
86 (
87  void
88 );
89 
90 //--------------------------------------------------------------------------------------------------
91 /**
92  *
93  * Try to connect the current client thread to the service providing this API. Return with an error
94  * if the service is not available.
95  *
96  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
97  * called before any other functions in this API. Normally, ConnectService is automatically called
98  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
99  *
100  * This function is created automatically.
101  *
102  * @return
103  * - LE_OK if the client connected successfully to the service.
104  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
105  * bound.
106  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
107  * - LE_COMM_ERROR if the Service Directory cannot be reached.
108  */
109 //--------------------------------------------------------------------------------------------------
111 (
112  void
113 );
114 
115 //--------------------------------------------------------------------------------------------------
116 /**
117  * Set handler called when server disconnection is detected.
118  *
119  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
120  * to continue without exiting, it should call longjmp() from inside the handler.
121  */
122 //--------------------------------------------------------------------------------------------------
124 (
125  le_riPin_DisconnectHandler_t disconnectHandler,
126  void *contextPtr
127 );
128 
129 //--------------------------------------------------------------------------------------------------
130 /**
131  *
132  * Disconnect the current client thread from the service providing this API.
133  *
134  * Normally, this function doesn't need to be called. After this function is called, there's no
135  * longer a connection to the service, and the functions in this API can't be used. For details, see
136  * @ref apiFilesC_client.
137  *
138  * This function is created automatically.
139  */
140 //--------------------------------------------------------------------------------------------------
142 (
143  void
144 );
145 
146 
147 //--------------------------------------------------------------------------------------------------
148 /**
149  * Check whether the application core is the current owner of the Ring Indicator signal.
150  *
151  * @return
152  * - LE_OK The function succeeded.
153  * - LE_FAULT The function failed.
154  * - LE_BAD_PARAMETER Bad input parameter.
155  */
156 //--------------------------------------------------------------------------------------------------
158 (
159  bool* amIOwnerPtr
160  ///< [OUT] true when application core is the owner of the Ring Indicator signal,
161 );
162 
163 //--------------------------------------------------------------------------------------------------
164 /**
165  * Take control of the Ring Indicator signal.
166  *
167  * @return
168  * - LE_OK The function succeeded.
169  * - LE_FAULT The function failed.
170  * - LE_UNSUPPORTED The platform does not support this operation.
171  */
172 //--------------------------------------------------------------------------------------------------
174 (
175  void
176 );
177 
178 //--------------------------------------------------------------------------------------------------
179 /**
180  * Release control of the Ring Indicator signal.
181  *
182  * @return
183  * - LE_OK The function succeeded.
184  * - LE_FAULT The function failed.
185  * - LE_UNSUPPORTED The platform does not support this operation.
186  */
187 //--------------------------------------------------------------------------------------------------
189 (
190  void
191 );
192 
193 //--------------------------------------------------------------------------------------------------
194 /**
195  * Set the Ring Indicator signal to high for configurable duration of time before lowering it.
196  *
197  */
198 //--------------------------------------------------------------------------------------------------
200 (
201  uint32_t duration
202  ///< [IN] [IN] Duration in ms
203 );
204 
205 #endif // LE_RIPIN_INTERFACE_H_INCLUDE_GUARD
le_result_t le_riPin_TryConnectService(void)
void(* le_riPin_DisconnectHandler_t)(void *)
Definition: le_riPin_interface.h:70
le_result_t
Definition: le_basics.h:35
void le_riPin_ConnectService(void)
void le_riPin_PulseRingSignal(uint32_t duration)
le_result_t le_riPin_TakeRingSignal(void)
void le_riPin_DisconnectService(void)
le_result_t le_riPin_AmIOwnerOfRingSignal(bool *amIOwnerPtr)
le_result_t le_riPin_ReleaseRingSignal(void)
void le_riPin_SetServerDisconnectHandler(le_riPin_DisconnectHandler_t disconnectHandler, void *contextPtr)