![]() |
nrfx 4.5.0
|
Hardware access layer with cache and barrier support for managing the UARTE peripheral. More...
Data Structures | |
| struct | nrfy_uarte_pins_t |
| UARTE pins configuration structure. More... | |
| struct | nrfy_uarte_config_t |
| UARTE configuration structure. More... | |
| struct | nrfy_uarte_buffer_t |
| Structure describing an UARTE transfer. More... | |
Functions | |
| NRFY_STATIC_INLINE void | nrfy_uarte_periph_configure (NRF_UARTE_Type *p_reg, nrfy_uarte_config_t const *p_config) |
| Function for configuring the UARTE. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_int_init (NRF_UARTE_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable) |
| Function for initializing the specified UARTE interrupts. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_int_uninit (NRF_UARTE_Type *p_reg) |
| Function for uninitializing the UARTE interrupts. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_events_process (NRF_UARTE_Type *p_reg, uint32_t mask, nrfy_uarte_buffer_t const *p_xfer) |
| Function for processing the specified UARTE events. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_tx_abort (NRF_UARTE_Type *p_reg, bool wait) |
| Function for aborting the ongoing UARTE transmission. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_stop (NRF_UARTE_Type *p_reg, nrfy_uarte_buffer_t const *p_xfer) |
| Function for stopping the UARTE transmitter and receiver. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_tx_start (NRF_UARTE_Type *p_reg, bool wait) |
| Function for starting the UARTE transmission. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_rx_start (NRF_UARTE_Type *p_reg, nrfy_uarte_buffer_t const *p_xfer) |
| Function for starting the UARTE reception. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_pins_get (NRF_UARTE_Type const *p_reg, nrfy_uarte_pins_t *p_pins) |
| Function for getting UARTE pins configuration. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_pins_disconnect (NRF_UARTE_Type *p_reg) |
| Function for disconnecting UARTE pins. | |
| NRFY_STATIC_INLINE void | nrfy_uarte_event_clear (NRF_UARTE_Type *p_reg, nrf_uarte_event_t event) |
| NRFY_STATIC_INLINE bool | nrfy_uarte_event_check (NRF_UARTE_Type const *p_reg, nrf_uarte_event_t event) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_event_address_get (NRF_UARTE_Type const *p_reg, nrf_uarte_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_uarte_shorts_set (NRF_UARTE_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_shorts_get (NRF_UARTE_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_uarte_shorts_enable (NRF_UARTE_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_uarte_shorts_disable (NRF_UARTE_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_uarte_int_enable (NRF_UARTE_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_int_enable_check (NRF_UARTE_Type const *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_uarte_int_disable (NRF_UARTE_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_uarte_subscribe_set (NRF_UARTE_Type *p_reg, nrf_uarte_task_t task, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_uarte_subscribe_clear (NRF_UARTE_Type *p_reg, nrf_uarte_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_uarte_publish_set (NRF_UARTE_Type *p_reg, nrf_uarte_event_t event, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_uarte_publish_clear (NRF_UARTE_Type *p_reg, nrf_uarte_event_t event) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_errorsrc_get_and_clear (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_enable (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_disable (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE bool | nrfy_uarte_enable_check (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_txrx_pins_set (NRF_UARTE_Type *p_reg, uint32_t pseltxd, uint32_t pselrxd) |
| NRFY_STATIC_INLINE void | nrfy_uarte_txrx_pins_disconnect (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_tx_pin_get (NRF_UARTE_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_rx_pin_get (NRF_UARTE_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_rts_pin_get (NRF_UARTE_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_cts_pin_get (NRF_UARTE_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_hwfc_pins_set (NRF_UARTE_Type *p_reg, uint32_t pselrts, uint32_t pselcts) |
| NRFY_STATIC_INLINE void | nrfy_uarte_hwfc_pins_disconnect (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_task_trigger (NRF_UARTE_Type *p_reg, nrf_uarte_task_t task) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_task_address_get (NRF_UARTE_Type const *p_reg, nrf_uarte_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_uarte_configure (NRF_UARTE_Type *p_reg, nrf_uarte_config_t const *p_cfg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_baudrate_set (NRF_UARTE_Type *p_reg, nrf_uarte_baudrate_t baudrate) |
| NRFY_STATIC_INLINE void | nrfy_uarte_tx_buffer_set (NRF_UARTE_Type *p_reg, uint8_t const *p_buffer, size_t length) |
| NRFY_STATIC_INLINE uint8_t const * | nrfy_uarte_tx_buffer_get (NRF_UARTE_Type *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_tx_amount_get (NRF_UARTE_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_uarte_rx_buffer_set (NRF_UARTE_Type *p_reg, uint8_t *p_buffer, size_t length) |
| NRFY_STATIC_INLINE uint32_t | nrfy_uarte_rx_amount_get (NRF_UARTE_Type const *p_reg) |
Hardware access layer with cache and barrier support for managing the UARTE peripheral.
| NRFY_STATIC_INLINE void nrfy_uarte_baudrate_set | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_baudrate_t | baudrate ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | baudrate | Baud rate. |
| NRFY_STATIC_INLINE void nrfy_uarte_configure | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_config_t const * | p_cfg ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_cfg | Pointer to UARTE settings structure. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_cts_pin_get | ( | NRF_UARTE_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_disable | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_enable | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE bool nrfy_uarte_enable_check | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The UARTE is enabled. |
| false | The UARTE is not enabled. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_errorsrc_get_and_clear | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_event_address_get | ( | NRF_UARTE_Type const * | p_reg, |
| nrf_uarte_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | The specified event. |
| NRFY_STATIC_INLINE bool nrfy_uarte_event_check | ( | NRF_UARTE_Type const * | p_reg, |
| nrf_uarte_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be checked. |
| true | The event has been generated. |
| false | The event has not been generated. |
| NRFY_STATIC_INLINE void nrfy_uarte_event_clear | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to clear. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_events_process | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask, | ||
| nrfy_uarte_buffer_t const * | p_xfer ) |
Function for processing the specified UARTE events.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK(). |
| [in] | p_xfer | Pointer to the structure containing buffer associated with the last reception. Can be NULL. |
| NRFY_STATIC_INLINE void nrfy_uarte_hwfc_pins_disconnect | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_hwfc_pins_set | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | pselrts, | ||
| uint32_t | pselcts ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pselrts | RTS pin number. |
| [in] | pselcts | CTS pin number. |
| NRFY_STATIC_INLINE void nrfy_uarte_int_disable | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_uarte_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_uarte_int_enable | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_uarte_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_int_enable_check | ( | NRF_UARTE_Type const * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_uarte_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_uarte_int_init | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask, | ||
| uint8_t | irq_priority, | ||
| bool | enable ) |
Function for initializing the specified UARTE interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be initialized. |
| [in] | irq_priority | Interrupt priority. |
| [in] | enable | True if interrupts associated with the event mask are to be enabled, false otherwise. |
| NRFY_STATIC_INLINE void nrfy_uarte_int_uninit | ( | NRF_UARTE_Type * | p_reg | ) |
Function for uninitializing the UARTE interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_periph_configure | ( | NRF_UARTE_Type * | p_reg, |
| nrfy_uarte_config_t const * | p_config ) |
Function for configuring the UARTE.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Pointer to the peripheral configuration structure. |
| NRFY_STATIC_INLINE void nrfy_uarte_pins_disconnect | ( | NRF_UARTE_Type * | p_reg | ) |
Function for disconnecting UARTE pins.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_pins_get | ( | NRF_UARTE_Type const * | p_reg, |
| nrfy_uarte_pins_t * | p_pins ) |
Function for getting UARTE pins configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the UARTE pin configurartion structure. |
| NRFY_STATIC_INLINE void nrfy_uarte_publish_clear | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to clear the configuration. |
| NRFY_STATIC_INLINE void nrfy_uarte_publish_set | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_event_t | event, | ||
| uint8_t | channel ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to set the configuration. |
| [in] | channel | Channel through which to publish the event. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_rts_pin_get | ( | NRF_UARTE_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_amount_get | ( | NRF_UARTE_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Amount | of bytes received. |
| NRFY_STATIC_INLINE void nrfy_uarte_rx_buffer_set | ( | NRF_UARTE_Type * | p_reg, |
| uint8_t * | p_buffer, | ||
| size_t | length ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the buffer for received data. |
| [in] | length | Maximum number of data bytes to receive. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_pin_get | ( | NRF_UARTE_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_start | ( | NRF_UARTE_Type * | p_reg, |
| nrfy_uarte_buffer_t const * | p_xfer ) |
Function for starting the UARTE reception.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing reception buffer if the reception is to be blocking. NULL for non-blocking reception. |
| NRFY_STATIC_INLINE void nrfy_uarte_shorts_disable | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Shortcuts to be disabled. |
| NRFY_STATIC_INLINE void nrfy_uarte_shorts_enable | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Shortcuts to be enabled. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_shorts_get | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Shortcuts to be checked. |
| NRFY_STATIC_INLINE void nrfy_uarte_shorts_set | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Shortcuts to be set. |
| NRFY_STATIC_INLINE void nrfy_uarte_stop | ( | NRF_UARTE_Type * | p_reg, |
| nrfy_uarte_buffer_t const * | p_xfer ) |
Function for stopping the UARTE transmitter and receiver.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing reception buffer. Can be NULL. |
| NRFY_STATIC_INLINE void nrfy_uarte_subscribe_clear | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to clear the configuration. |
| NRFY_STATIC_INLINE void nrfy_uarte_subscribe_set | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_task_t | task, | ||
| uint8_t | channel ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to set the configuration. |
| [in] | channel | Channel through which to subscribe events. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_task_address_get | ( | NRF_UARTE_Type const * | p_reg, |
| nrf_uarte_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task. |
| NRFY_STATIC_INLINE void nrfy_uarte_task_trigger | ( | NRF_UARTE_Type * | p_reg, |
| nrf_uarte_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task. |
| NRFY_STATIC_INLINE void nrfy_uarte_tx_abort | ( | NRF_UARTE_Type * | p_reg, |
| bool | wait ) |
Function for aborting the ongoing UARTE transmission.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | wait | True if CPU should wait for peripheral to abort transmission, false otherwise. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_amount_get | ( | NRF_UARTE_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Amount | of bytes transmitted. |
| NRFY_STATIC_INLINE uint8_t const * nrfy_uarte_tx_buffer_get | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_tx_buffer_set | ( | NRF_UARTE_Type * | p_reg, |
| uint8_t const * | p_buffer, | ||
| size_t | length ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the buffer with data to send. |
| [in] | length | Maximum number of data bytes to transmit. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_pin_get | ( | NRF_UARTE_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_start | ( | NRF_UARTE_Type * | p_reg, |
| bool | wait ) |
Function for starting the UARTE transmission.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | wait | True for blocking transmission, false otherwise. |
| NRFY_STATIC_INLINE void nrfy_uarte_txrx_pins_disconnect | ( | NRF_UARTE_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_uarte_txrx_pins_set | ( | NRF_UARTE_Type * | p_reg, |
| uint32_t | pseltxd, | ||
| uint32_t | pselrxd ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pseltxd | TXD pin number. |
| [in] | pselrxd | RXD pin number. |