UARTE HALY
- group nrfy_uarte
Hardware access layer with cache and barrier support for managing the UARTE peripheral.
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_config – [in] Pointer to the peripheral configuration structure.
-
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be initialized.
irq_priority – [in] Interrupt priority.
enable – [in] 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_events_process(NRF_UARTE_Type *p_reg, uint32_t mask, nrfy_uarte_xfer_desc_t const *p_xfer)
Function for processing the specified UARTE events.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
p_xfer – [in] Pointer to the structure containing buffer associated with the last reception. Can be NULL.
- Returns:
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().
-
NRFY_STATIC_INLINE void nrfy_uarte_tx_abort(NRF_UARTE_Type *p_reg, bool wait)
Function for aborting the ongoing UARTE transmission.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
wait – [in] True if CPU should wait for peripheral to abort transmission, false otherwise.
-
NRFY_STATIC_INLINE void nrfy_uarte_stop(NRF_UARTE_Type *p_reg, nrfy_uarte_xfer_desc_t const *p_xfer)
Function for stopping the UARTE transmitter and receiver.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_xfer – [in] Pointer to the structure containing reception buffer. Can be NULL.
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_start(NRF_UARTE_Type *p_reg, bool wait)
Function for starting the UARTE transmission.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
wait – [in] True for blocking transmission, false otherwise.
- Returns:
Mask of events occured, created by NRFY_EVENT_TO_INT_BITMASK(). Always 0 for non-blocking transmission.
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_start(NRF_UARTE_Type *p_reg, nrfy_uarte_xfer_desc_t const *p_xfer)
Function for starting the UARTE reception.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_xfer – [in] Pointer to the structure containing reception buffer if the reception is to be blocking. NULL for non-blocking reception.
- Returns:
Mask of events occured, created by NRFY_EVENT_TO_INT_BITMASK(). Always 0 for non-blocking 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_pins – [in] Pointer to the UARTE pin configurartion structure.
-
NRFY_STATIC_INLINE void nrfy_uarte_pins_disconnect(NRF_UARTE_Type *p_reg)
Function for disconnecting UARTE pins.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
NRFY_STATIC_INLINE void nrfy_uarte_event_clear(NRF_UARTE_Type *p_reg, nrf_uarte_event_t event)
@refhal{nrf_uarte_event_clear}
-
NRFY_STATIC_INLINE bool nrfy_uarte_event_check(NRF_UARTE_Type const *p_reg, nrf_uarte_event_t event)
@refhal{nrf_uarte_event_check}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_event_address_get(NRF_UARTE_Type const *p_reg, nrf_uarte_event_t event)
@refhal{nrf_uarte_event_address_get}
-
NRFY_STATIC_INLINE void nrfy_uarte_shorts_enable(NRF_UARTE_Type *p_reg, uint32_t mask)
@refhal{nrf_uarte_shorts_enable}
-
NRFY_STATIC_INLINE void nrfy_uarte_shorts_disable(NRF_UARTE_Type *p_reg, uint32_t mask)
@refhal{nrf_uarte_shorts_disable}
-
NRFY_STATIC_INLINE void nrfy_uarte_int_enable(NRF_UARTE_Type *p_reg, uint32_t mask)
@refhal{nrf_uarte_int_enable}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_int_enable_check(NRF_UARTE_Type const *p_reg, uint32_t mask)
@refhal{nrf_uarte_int_enable_check}
-
NRFY_STATIC_INLINE void nrfy_uarte_int_disable(NRF_UARTE_Type *p_reg, uint32_t mask)
@refhal{nrf_uarte_int_disable}
-
NRFY_STATIC_INLINE void nrfy_uarte_subscribe_set(NRF_UARTE_Type *p_reg, nrf_uarte_task_t task, uint8_t channel)
@refhal{nrf_uarte_subscribe_set}
-
NRFY_STATIC_INLINE void nrfy_uarte_subscribe_clear(NRF_UARTE_Type *p_reg, nrf_uarte_task_t task)
@refhal{nrf_uarte_subscribe_clear}
-
NRFY_STATIC_INLINE void nrfy_uarte_publish_set(NRF_UARTE_Type *p_reg, nrf_uarte_event_t event, uint8_t channel)
@refhal{nrf_uarte_publish_set}
-
NRFY_STATIC_INLINE void nrfy_uarte_publish_clear(NRF_UARTE_Type *p_reg, nrf_uarte_event_t event)
@refhal{nrf_uarte_publish_clear}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_errorsrc_get_and_clear(NRF_UARTE_Type *p_reg)
@refhal{nrf_uarte_errorsrc_get_and_clear}
-
NRFY_STATIC_INLINE void nrfy_uarte_enable(NRF_UARTE_Type *p_reg)
@refhal{nrf_uarte_enable}
-
NRFY_STATIC_INLINE void nrfy_uarte_disable(NRF_UARTE_Type *p_reg)
@refhal{nrf_uarte_disable}
-
NRFY_STATIC_INLINE void nrfy_uarte_txrx_pins_set(NRF_UARTE_Type *p_reg, uint32_t pseltxd, uint32_t pselrxd)
@refhal{nrf_uarte_txrx_pins_set}
-
NRFY_STATIC_INLINE void nrfy_uarte_txrx_pins_disconnect(NRF_UARTE_Type *p_reg)
@refhal{nrf_uarte_txrx_pins_disconnect}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_pin_get(NRF_UARTE_Type const *p_reg)
@refhal{nrf_uarte_tx_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_pin_get(NRF_UARTE_Type const *p_reg)
@refhal{nrf_uarte_rx_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_rts_pin_get(NRF_UARTE_Type const *p_reg)
@refhal{nrf_uarte_rts_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_cts_pin_get(NRF_UARTE_Type const *p_reg)
@refhal{nrf_uarte_cts_pin_get}
-
NRFY_STATIC_INLINE void nrfy_uarte_hwfc_pins_set(NRF_UARTE_Type *p_reg, uint32_t pselrts, uint32_t pselcts)
@refhal{nrf_uarte_hwfc_pins_set}
-
NRFY_STATIC_INLINE void nrfy_uarte_hwfc_pins_disconnect(NRF_UARTE_Type *p_reg)
@refhal{nrf_uarte_hwfc_pins_disconnect}
-
NRFY_STATIC_INLINE void nrfy_uarte_task_trigger(NRF_UARTE_Type *p_reg, nrf_uarte_task_t task)
@refhal{nrf_uarte_task_trigger}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_task_address_get(NRF_UARTE_Type const *p_reg, nrf_uarte_task_t task)
@refhal{nrf_uarte_task_address_get}
-
NRFY_STATIC_INLINE void nrfy_uarte_configure(NRF_UARTE_Type *p_reg, nrf_uarte_config_t const *p_cfg)
@refhal{nrf_uarte_configure}
-
NRFY_STATIC_INLINE void nrfy_uarte_baudrate_set(NRF_UARTE_Type *p_reg, nrf_uarte_baudrate_t baudrate)
@refhal{nrf_uarte_baudrate_set}
-
NRFY_STATIC_INLINE void nrfy_uarte_tx_buffer_set(NRF_UARTE_Type *p_reg, uint8_t const *p_buffer, size_t length)
@refhal{nrf_uarte_tx_buffer_set}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_amount_get(NRF_UARTE_Type const *p_reg)
@refhal{nrf_uarte_tx_amount_get}
-
NRFY_STATIC_INLINE void nrfy_uarte_rx_buffer_set(NRF_UARTE_Type *p_reg, uint8_t *p_buffer, size_t length)
@refhal{nrf_uarte_rx_buffer_set}
-
NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_amount_get(NRF_UARTE_Type const *p_reg)
@refhal{nrf_uarte_rx_amount_get}
-
struct nrfy_uarte_pins_t
- #include <nrfy_uarte.h>
UARTE pins configuration structure.
-
struct nrfy_uarte_config_t
- #include <nrfy_uarte.h>
UARTE configuration structure.
Public Members
-
nrfy_uarte_pins_t pins
Pin configuration structure.
-
nrf_uarte_baudrate_t baudrate
Baud rate.
-
nrf_uarte_config_t config
Peripheral configuration.
-
bool skip_psel_cfg
Skip pin selection configuration.
When set to true, the driver does not modify pin select registers in the peripheral. Those registers are supposed to be set up externally before the driver is initialized.
Note
When both GPIO configuration and pin selection are to be skipped, the structure fields that specify pins can be omitted, as they are ignored anyway.
-
nrfy_uarte_pins_t pins
-
struct nrfy_uarte_xfer_desc_t
- #include <nrfy_uarte.h>
Structure describing an UARTE transfer.
-
NRFY_STATIC_INLINE void nrfy_uarte_periph_configure(NRF_UARTE_Type *p_reg, nrfy_uarte_config_t const *p_config)