xref: /nrf52832-nimble/nordic/nrfx/drivers/include/nrfx_uart.h (revision 150812a83cab50279bd772ef6db1bfaf255f2c5b)
1*150812a8SEvalZero /*
2*150812a8SEvalZero  * Copyright (c) 2015 - 2018, Nordic Semiconductor ASA
3*150812a8SEvalZero  * All rights reserved.
4*150812a8SEvalZero  *
5*150812a8SEvalZero  * Redistribution and use in source and binary forms, with or without
6*150812a8SEvalZero  * modification, are permitted provided that the following conditions are met:
7*150812a8SEvalZero  *
8*150812a8SEvalZero  * 1. Redistributions of source code must retain the above copyright notice, this
9*150812a8SEvalZero  *    list of conditions and the following disclaimer.
10*150812a8SEvalZero  *
11*150812a8SEvalZero  * 2. Redistributions in binary form must reproduce the above copyright
12*150812a8SEvalZero  *    notice, this list of conditions and the following disclaimer in the
13*150812a8SEvalZero  *    documentation and/or other materials provided with the distribution.
14*150812a8SEvalZero  *
15*150812a8SEvalZero  * 3. Neither the name of the copyright holder nor the names of its
16*150812a8SEvalZero  *    contributors may be used to endorse or promote products derived from this
17*150812a8SEvalZero  *    software without specific prior written permission.
18*150812a8SEvalZero  *
19*150812a8SEvalZero  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20*150812a8SEvalZero  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21*150812a8SEvalZero  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22*150812a8SEvalZero  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23*150812a8SEvalZero  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*150812a8SEvalZero  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*150812a8SEvalZero  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*150812a8SEvalZero  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*150812a8SEvalZero  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*150812a8SEvalZero  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*150812a8SEvalZero  * POSSIBILITY OF SUCH DAMAGE.
30*150812a8SEvalZero  */
31*150812a8SEvalZero 
32*150812a8SEvalZero #ifndef NRFX_UART_H__
33*150812a8SEvalZero #define NRFX_UART_H__
34*150812a8SEvalZero 
35*150812a8SEvalZero #include <nrfx.h>
36*150812a8SEvalZero #include <hal/nrf_uart.h>
37*150812a8SEvalZero 
38*150812a8SEvalZero #ifdef __cplusplus
39*150812a8SEvalZero extern "C" {
40*150812a8SEvalZero #endif
41*150812a8SEvalZero 
42*150812a8SEvalZero /**
43*150812a8SEvalZero  * @defgroup nrfx_uart UART driver
44*150812a8SEvalZero  * @{
45*150812a8SEvalZero  * @ingroup nrf_uart
46*150812a8SEvalZero  * @brief   UART peripheral driver.
47*150812a8SEvalZero  */
48*150812a8SEvalZero 
49*150812a8SEvalZero /**
50*150812a8SEvalZero  * @brief UART driver instance data structure.
51*150812a8SEvalZero  */
52*150812a8SEvalZero typedef struct
53*150812a8SEvalZero {
54*150812a8SEvalZero     NRF_UART_Type * p_reg;        ///< Pointer to a structure with UART registers.
55*150812a8SEvalZero     uint8_t         drv_inst_idx; ///< Driver instance index.
56*150812a8SEvalZero } nrfx_uart_t;
57*150812a8SEvalZero 
58*150812a8SEvalZero enum {
59*150812a8SEvalZero #if NRFX_CHECK(NRFX_UART0_ENABLED)
60*150812a8SEvalZero     NRFX_UART0_INST_IDX,
61*150812a8SEvalZero #endif
62*150812a8SEvalZero     NRFX_UART_ENABLED_COUNT
63*150812a8SEvalZero };
64*150812a8SEvalZero 
65*150812a8SEvalZero /**
66*150812a8SEvalZero  * @brief Macro for creating a UART driver instance.
67*150812a8SEvalZero  */
68*150812a8SEvalZero #define NRFX_UART_INSTANCE(id)                               \
69*150812a8SEvalZero {                                                            \
70*150812a8SEvalZero     .p_reg        = NRFX_CONCAT_2(NRF_UART, id),             \
71*150812a8SEvalZero     .drv_inst_idx = NRFX_CONCAT_3(NRFX_UART, id, _INST_IDX), \
72*150812a8SEvalZero }
73*150812a8SEvalZero 
74*150812a8SEvalZero /**
75*150812a8SEvalZero  * @brief Types of UART driver events.
76*150812a8SEvalZero  */
77*150812a8SEvalZero typedef enum
78*150812a8SEvalZero {
79*150812a8SEvalZero     NRFX_UART_EVT_TX_DONE, ///< Requested TX transfer completed.
80*150812a8SEvalZero     NRFX_UART_EVT_RX_DONE, ///< Requested RX transfer completed.
81*150812a8SEvalZero     NRFX_UART_EVT_ERROR,   ///< Error reported by UART peripheral.
82*150812a8SEvalZero } nrfx_uart_evt_type_t;
83*150812a8SEvalZero 
84*150812a8SEvalZero /**
85*150812a8SEvalZero  * @brief Structure for UART configuration.
86*150812a8SEvalZero  */
87*150812a8SEvalZero typedef struct
88*150812a8SEvalZero {
89*150812a8SEvalZero     uint32_t            pseltxd;            ///< TXD pin number.
90*150812a8SEvalZero     uint32_t            pselrxd;            ///< RXD pin number.
91*150812a8SEvalZero     uint32_t            pselcts;            ///< CTS pin number.
92*150812a8SEvalZero     uint32_t            pselrts;            ///< RTS pin number.
93*150812a8SEvalZero     void *              p_context;          ///< Context passed to interrupt handler.
94*150812a8SEvalZero     nrf_uart_hwfc_t     hwfc;               ///< Flow control configuration.
95*150812a8SEvalZero     nrf_uart_parity_t   parity;             ///< Parity configuration.
96*150812a8SEvalZero     nrf_uart_baudrate_t baudrate;           ///< Baudrate.
97*150812a8SEvalZero     uint8_t             interrupt_priority; ///< Interrupt priority.
98*150812a8SEvalZero } nrfx_uart_config_t;
99*150812a8SEvalZero 
100*150812a8SEvalZero /**
101*150812a8SEvalZero  * @brief UART default configuration.
102*150812a8SEvalZero  */
103*150812a8SEvalZero #define NRFX_UART_DEFAULT_CONFIG                                                  \
104*150812a8SEvalZero {                                                                                 \
105*150812a8SEvalZero     .pseltxd            = NRF_UART_PSEL_DISCONNECTED,                             \
106*150812a8SEvalZero     .pselrxd            = NRF_UART_PSEL_DISCONNECTED,                             \
107*150812a8SEvalZero     .pselcts            = NRF_UART_PSEL_DISCONNECTED,                             \
108*150812a8SEvalZero     .pselrts            = NRF_UART_PSEL_DISCONNECTED,                             \
109*150812a8SEvalZero     .p_context          = NULL,                                                   \
110*150812a8SEvalZero     .hwfc               = (nrf_uart_hwfc_t)NRFX_UART_DEFAULT_CONFIG_HWFC,         \
111*150812a8SEvalZero     .parity             = (nrf_uart_parity_t)NRFX_UART_DEFAULT_CONFIG_PARITY,     \
112*150812a8SEvalZero     .baudrate           = (nrf_uart_baudrate_t)NRFX_UART_DEFAULT_CONFIG_BAUDRATE, \
113*150812a8SEvalZero     .interrupt_priority = NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY,                  \
114*150812a8SEvalZero }
115*150812a8SEvalZero 
116*150812a8SEvalZero /**
117*150812a8SEvalZero  * @brief Structure for UART transfer completion event.
118*150812a8SEvalZero  */
119*150812a8SEvalZero typedef struct
120*150812a8SEvalZero {
121*150812a8SEvalZero     uint8_t * p_data; ///< Pointer to memory used for transfer.
122*150812a8SEvalZero     uint32_t  bytes;  ///< Number of bytes transfered.
123*150812a8SEvalZero } nrfx_uart_xfer_evt_t;
124*150812a8SEvalZero 
125*150812a8SEvalZero /**
126*150812a8SEvalZero  * @brief Structure for UART error event.
127*150812a8SEvalZero  */
128*150812a8SEvalZero typedef struct
129*150812a8SEvalZero {
130*150812a8SEvalZero     nrfx_uart_xfer_evt_t rxtx;       ///< Transfer details includes number of bytes transferred.
131*150812a8SEvalZero     uint32_t             error_mask; ///< Mask of error flags that generated the event.
132*150812a8SEvalZero } nrfx_uart_error_evt_t;
133*150812a8SEvalZero 
134*150812a8SEvalZero /**
135*150812a8SEvalZero  * @brief Structure for UART event.
136*150812a8SEvalZero  */
137*150812a8SEvalZero typedef struct
138*150812a8SEvalZero {
139*150812a8SEvalZero     nrfx_uart_evt_type_t type; ///< Event type.
140*150812a8SEvalZero     union
141*150812a8SEvalZero     {
142*150812a8SEvalZero         nrfx_uart_xfer_evt_t  rxtx;  ///< Data provided for transfer completion events.
143*150812a8SEvalZero         nrfx_uart_error_evt_t error; ///< Data provided for error event.
144*150812a8SEvalZero     } data;
145*150812a8SEvalZero } nrfx_uart_event_t;
146*150812a8SEvalZero 
147*150812a8SEvalZero /**
148*150812a8SEvalZero  * @brief UART interrupt event handler.
149*150812a8SEvalZero  *
150*150812a8SEvalZero  * @param[in] p_event    Pointer to event structure. Event is allocated on the stack so it is available
151*150812a8SEvalZero  *                       only within the context of the event handler.
152*150812a8SEvalZero  * @param[in] p_context  Context passed to interrupt handler, set on initialization.
153*150812a8SEvalZero  */
154*150812a8SEvalZero typedef void (*nrfx_uart_event_handler_t)(nrfx_uart_event_t const * p_event,
155*150812a8SEvalZero                                           void *                    p_context);
156*150812a8SEvalZero 
157*150812a8SEvalZero /**
158*150812a8SEvalZero  * @brief Function for initializing the UART driver.
159*150812a8SEvalZero  *
160*150812a8SEvalZero  * This function configures and enables UART. After this function GPIO pins are controlled by UART.
161*150812a8SEvalZero  *
162*150812a8SEvalZero  * @param[in] p_instance    Pointer to the driver instance structure.
163*150812a8SEvalZero  * @param[in] p_config      Pointer to the structure with initial configuration.
164*150812a8SEvalZero  * @param[in] event_handler Event handler provided by the user. If not provided driver works in
165*150812a8SEvalZero  *                          blocking mode.
166*150812a8SEvalZero  *
167*150812a8SEvalZero  * @retval    NRFX_SUCCESS             If initialization was successful.
168*150812a8SEvalZero  * @retval    NRFX_ERROR_INVALID_STATE If driver is already initialized.
169*150812a8SEvalZero  * @retval    NRFX_ERROR_BUSY          If some other peripheral with the same
170*150812a8SEvalZero  *                                     instance ID is already in use. This is
171*150812a8SEvalZero  *                                     possible only if @ref nrfx_prs module
172*150812a8SEvalZero  *                                     is enabled.
173*150812a8SEvalZero  */
174*150812a8SEvalZero nrfx_err_t nrfx_uart_init(nrfx_uart_t const *        p_instance,
175*150812a8SEvalZero                           nrfx_uart_config_t const * p_config,
176*150812a8SEvalZero                           nrfx_uart_event_handler_t  event_handler);
177*150812a8SEvalZero 
178*150812a8SEvalZero /**
179*150812a8SEvalZero  * @brief Function for uninitializing  the UART driver.
180*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
181*150812a8SEvalZero  */
182*150812a8SEvalZero void nrfx_uart_uninit(nrfx_uart_t const * p_instance);
183*150812a8SEvalZero 
184*150812a8SEvalZero /**
185*150812a8SEvalZero  * @brief Function for getting the address of a specific UART task.
186*150812a8SEvalZero  *
187*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
188*150812a8SEvalZero  * @param[in] task       Task.
189*150812a8SEvalZero  *
190*150812a8SEvalZero  * @return    Task address.
191*150812a8SEvalZero  */
192*150812a8SEvalZero __STATIC_INLINE uint32_t nrfx_uart_task_address_get(nrfx_uart_t const * p_instance,
193*150812a8SEvalZero                                                     nrf_uart_task_t     task);
194*150812a8SEvalZero 
195*150812a8SEvalZero /**
196*150812a8SEvalZero  * @brief Function for getting the address of a specific UART event.
197*150812a8SEvalZero  *
198*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
199*150812a8SEvalZero  * @param[in] event      Event.
200*150812a8SEvalZero  *
201*150812a8SEvalZero  * @return    Event address.
202*150812a8SEvalZero  */
203*150812a8SEvalZero __STATIC_INLINE uint32_t nrfx_uart_event_address_get(nrfx_uart_t const * p_instance,
204*150812a8SEvalZero                                                      nrf_uart_event_t    event);
205*150812a8SEvalZero 
206*150812a8SEvalZero /**
207*150812a8SEvalZero  * @brief Function for sending data over UART.
208*150812a8SEvalZero  *
209*150812a8SEvalZero  * If an event handler was provided in nrfx_uart_init() call, this function
210*150812a8SEvalZero  * returns immediately and the handler is called when the transfer is done.
211*150812a8SEvalZero  * Otherwise, the transfer is performed in blocking mode, i.e. this function
212*150812a8SEvalZero  * returns when the transfer is finished. Blocking mode is not using interrupt
213*150812a8SEvalZero  * so there is no context switching inside the function.
214*150812a8SEvalZero  *
215*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
216*150812a8SEvalZero  * @param[in] p_data     Pointer to data.
217*150812a8SEvalZero  * @param[in] length     Number of bytes to send.
218*150812a8SEvalZero  *
219*150812a8SEvalZero  * @retval    NRFX_SUCCESS            If initialization was successful.
220*150812a8SEvalZero  * @retval    NRFX_ERROR_BUSY         If driver is already transferring.
221*150812a8SEvalZero  * @retval    NRFX_ERROR_FORBIDDEN    If the transfer was aborted from a different context
222*150812a8SEvalZero  *                                    (blocking mode only).
223*150812a8SEvalZero  */
224*150812a8SEvalZero nrfx_err_t nrfx_uart_tx(nrfx_uart_t const * p_instance,
225*150812a8SEvalZero                         uint8_t const *     p_data,
226*150812a8SEvalZero                         size_t              length);
227*150812a8SEvalZero 
228*150812a8SEvalZero /**
229*150812a8SEvalZero  * @brief Function for checking if UART is currently transmitting.
230*150812a8SEvalZero  *
231*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
232*150812a8SEvalZero  *
233*150812a8SEvalZero  * @retval true  If UART is transmitting.
234*150812a8SEvalZero  * @retval false If UART is not transmitting.
235*150812a8SEvalZero  */
236*150812a8SEvalZero bool nrfx_uart_tx_in_progress(nrfx_uart_t const * p_instance);
237*150812a8SEvalZero 
238*150812a8SEvalZero /**
239*150812a8SEvalZero  * @brief Function for aborting any ongoing transmission.
240*150812a8SEvalZero  * @note @ref NRFX_UART_EVT_TX_DONE event will be generated in non-blocking mode.
241*150812a8SEvalZero  *       It will contain number of bytes sent until abort was called. The event
242*150812a8SEvalZero  *       handler will be called from the function context.
243*150812a8SEvalZero  *
244*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
245*150812a8SEvalZero  */
246*150812a8SEvalZero void nrfx_uart_tx_abort(nrfx_uart_t const * p_instance);
247*150812a8SEvalZero 
248*150812a8SEvalZero /**
249*150812a8SEvalZero  * @brief Function for receiving data over UART.
250*150812a8SEvalZero  *
251*150812a8SEvalZero  * If an event handler was provided in the nrfx_uart_init() call, this function
252*150812a8SEvalZero  * returns immediately and the handler is called when the transfer is done.
253*150812a8SEvalZero  * Otherwise, the transfer is performed in blocking mode, meaning that this function
254*150812a8SEvalZero  * returns when the transfer is finished. Blocking mode is not using interrupt so
255*150812a8SEvalZero  * there is no context switching inside the function.
256*150812a8SEvalZero  *
257*150812a8SEvalZero  * The receive buffer pointer is double buffered in non-blocking mode. The secondary
258*150812a8SEvalZero  * buffer can be set immediately after starting the transfer and will be filled
259*150812a8SEvalZero  * when the primary buffer is full. The double buffering feature allows
260*150812a8SEvalZero  * receiving data continuously.
261*150812a8SEvalZero  *
262*150812a8SEvalZero  * If this function is used without a previous call to @ref nrfx_uart_rx_enable, the reception
263*150812a8SEvalZero  * will be stopped on error or when the supplied buffer fills up. In both cases,
264*150812a8SEvalZero  * RX FIFO gets disabled. This means that, in case of error, the bytes that follow are lost.
265*150812a8SEvalZero  * If this nrfx_uart_rx() function is used with the previous call to @ref nrfx_uart_rx_enable,
266*150812a8SEvalZero  * the reception is stopped in case of error, but FIFO is still ongoing. The receiver is still
267*150812a8SEvalZero  * working, so after handling the error, an immediate repeated call to this nrfx_uart_rx()
268*150812a8SEvalZero  * function with fresh data buffer will re-establish reception. To disable the receiver,
269*150812a8SEvalZero  * you must call @ref nrfx_uart_rx_disable explicitly.
270*150812a8SEvalZero  *
271*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
272*150812a8SEvalZero  * @param[in] p_data     Pointer to data.
273*150812a8SEvalZero  * @param[in] length     Number of bytes to receive.
274*150812a8SEvalZero  *
275*150812a8SEvalZero  * @retval    NRFX_SUCCESS         If reception is complete (in case of blocking mode) or it is
276*150812a8SEvalZero  *                                 successfully started (in case of non-blocking mode).
277*150812a8SEvalZero  * @retval    NRFX_ERROR_BUSY      If the driver is already receiving
278*150812a8SEvalZero  *                                 (and the secondary buffer has already been set
279*150812a8SEvalZero  *                                 in non-blocking mode).
280*150812a8SEvalZero  * @retval    NRFX_ERROR_FORBIDDEN If the transfer was aborted from a different context
281*150812a8SEvalZero  *                                 (blocking mode only, also see @ref nrfx_uart_rx_disable).
282*150812a8SEvalZero  * @retval    NRFX_ERROR_INTERNAL  If UART peripheral reported an error.
283*150812a8SEvalZero  */
284*150812a8SEvalZero nrfx_err_t nrfx_uart_rx(nrfx_uart_t const * p_instance,
285*150812a8SEvalZero                         uint8_t *           p_data,
286*150812a8SEvalZero                         size_t              length);
287*150812a8SEvalZero 
288*150812a8SEvalZero 
289*150812a8SEvalZero 
290*150812a8SEvalZero /**
291*150812a8SEvalZero  * @brief Function for testing the receiver state in blocking mode.
292*150812a8SEvalZero  *
293*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
294*150812a8SEvalZero  *
295*150812a8SEvalZero  * @retval true  If the receiver has at least one byte of data to get.
296*150812a8SEvalZero  * @retval false If the receiver is empty.
297*150812a8SEvalZero  */
298*150812a8SEvalZero bool nrfx_uart_rx_ready(nrfx_uart_t const * p_instance);
299*150812a8SEvalZero 
300*150812a8SEvalZero /**
301*150812a8SEvalZero  * @brief Function for enabling the receiver.
302*150812a8SEvalZero  *
303*150812a8SEvalZero  * UART has a 6-byte-long RX FIFO and it is used to store incoming data. If a user does not call the
304*150812a8SEvalZero  * UART receive function before the FIFO is filled, an overrun error will appear. The receiver must be
305*150812a8SEvalZero  * explicitly closed by the user @sa nrfx_uart_rx_disable.
306*150812a8SEvalZero  *
307*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
308*150812a8SEvalZero  */
309*150812a8SEvalZero void nrfx_uart_rx_enable(nrfx_uart_t const * p_instance);
310*150812a8SEvalZero 
311*150812a8SEvalZero /**
312*150812a8SEvalZero  * @brief Function for disabling the receiver.
313*150812a8SEvalZero  *
314*150812a8SEvalZero  * This function must be called to close the receiver after it has been explicitly enabled by
315*150812a8SEvalZero  * @sa nrfx_uart_rx_enable.
316*150812a8SEvalZero  *
317*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
318*150812a8SEvalZero  */
319*150812a8SEvalZero void nrfx_uart_rx_disable(nrfx_uart_t const * p_instance);
320*150812a8SEvalZero 
321*150812a8SEvalZero /**
322*150812a8SEvalZero  * @brief Function for aborting any ongoing reception.
323*150812a8SEvalZero  * @note @ref NRFX_UART_EVT_TX_DONE event will be generated in non-blocking mode.
324*150812a8SEvalZero  *       It will contain number of bytes received until abort was called. The event
325*150812a8SEvalZero  *       handler will be called from the UART interrupt context.
326*150812a8SEvalZero  *
327*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
328*150812a8SEvalZero  */
329*150812a8SEvalZero void nrfx_uart_rx_abort(nrfx_uart_t const * p_instance);
330*150812a8SEvalZero 
331*150812a8SEvalZero /**
332*150812a8SEvalZero  * @brief Function for reading error source mask. Mask contains values from @ref nrf_uart_error_mask_t.
333*150812a8SEvalZero  * @note Function should be used in blocking mode only. In case of non-blocking mode, an error event is
334*150812a8SEvalZero  *       generated. Function clears error sources after reading.
335*150812a8SEvalZero  *
336*150812a8SEvalZero  * @param[in] p_instance Pointer to the driver instance structure.
337*150812a8SEvalZero  *
338*150812a8SEvalZero  * @retval    Mask of reported errors.
339*150812a8SEvalZero  */
340*150812a8SEvalZero uint32_t nrfx_uart_errorsrc_get(nrfx_uart_t const * p_instance);
341*150812a8SEvalZero 
342*150812a8SEvalZero 
343*150812a8SEvalZero #ifndef SUPPRESS_INLINE_IMPLEMENTATION
nrfx_uart_task_address_get(nrfx_uart_t const * p_instance,nrf_uart_task_t task)344*150812a8SEvalZero __STATIC_INLINE uint32_t nrfx_uart_task_address_get(nrfx_uart_t const * p_instance,
345*150812a8SEvalZero                                                     nrf_uart_task_t     task)
346*150812a8SEvalZero {
347*150812a8SEvalZero     return nrf_uart_task_address_get(p_instance->p_reg, task);
348*150812a8SEvalZero }
349*150812a8SEvalZero 
nrfx_uart_event_address_get(nrfx_uart_t const * p_instance,nrf_uart_event_t event)350*150812a8SEvalZero __STATIC_INLINE uint32_t nrfx_uart_event_address_get(nrfx_uart_t const * p_instance,
351*150812a8SEvalZero                                                      nrf_uart_event_t    event)
352*150812a8SEvalZero {
353*150812a8SEvalZero     return nrf_uart_event_address_get(p_instance->p_reg, event);
354*150812a8SEvalZero }
355*150812a8SEvalZero #endif // SUPPRESS_INLINE_IMPLEMENTATION
356*150812a8SEvalZero 
357*150812a8SEvalZero 
358*150812a8SEvalZero void nrfx_uart_0_irq_handler(void);
359*150812a8SEvalZero 
360*150812a8SEvalZero 
361*150812a8SEvalZero /** @} */
362*150812a8SEvalZero 
363*150812a8SEvalZero #ifdef __cplusplus
364*150812a8SEvalZero }
365*150812a8SEvalZero #endif
366*150812a8SEvalZero 
367*150812a8SEvalZero #endif // NRFX_UART_H__
368