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