Hardware access layer for managing the Two Wire Interface Slave with EasyDMA (TWIS) peripheral. More...
Macros | |
#define | NRF_TWIS_HAS_DMA_REG 1 |
Symbol indicating whether dedicated DMA register is present. | |
#define | NRF_TWIS_HAS_DMA_TASKS_EVENTS 1 |
Symbol indicating whether TWIS DMA tasks and events are present. | |
#define | NRF_TWIS_HAS_LIST_REG 1 |
Symbol indicating whether TX or RX LIST is present. | |
#define | NRF_TWIS_TX_MAX_COUNT_SIZE TWIS_DMA_TX_MAXCNT_MAXCNT_Max |
Symbol specifying maximum possible size of the TX channel buffer. | |
#define | NRF_TWIS_RX_MAX_COUNT_SIZE TWIS_DMA_RX_MAXCNT_MAXCNT_Max |
Symbol specifying maximum possible size of the RX channel buffer. | |
#define | NRF_TWIS_INST_GET(idx) NRFX_CONCAT(NRF_, TWIS, idx) |
Macro getting pointer to the structure of registers of the TWIS peripheral. | |
Typedefs | |
typedef uint8_t | nrf_twis_address_t |
Smallest variable type to hold the TWI address. | |
Enumerations | |
enum | nrf_twis_task_t { NRF_TWIS_TASK_STOP = offsetof(NRF_TWIS_Type, TASKS_STOP) , NRF_TWIS_TASK_SUSPEND = offsetof(NRF_TWIS_Type, TASKS_SUSPEND) , NRF_TWIS_TASK_RESUME = offsetof(NRF_TWIS_Type, TASKS_RESUME) , NRF_TWIS_TASK_PREPARERX = offsetof(NRF_TWIS_Type, TASKS_PREPARERX) , NRF_TWIS_TASK_PREPARETX = offsetof(NRF_TWIS_Type, TASKS_PREPARETX) } |
TWIS tasks. More... | |
enum | nrf_twis_event_t { NRF_TWIS_EVENT_STOPPED = offsetof(NRF_TWIS_Type, EVENTS_STOPPED) , NRF_TWIS_EVENT_ERROR = offsetof(NRF_TWIS_Type, EVENTS_ERROR) , NRF_TWIS_EVENT_RXSTARTED = offsetof(NRF_TWIS_Type, EVENTS_DMA.RX.READY) , NRF_TWIS_EVENT_TXSTARTED = offsetof(NRF_TWIS_Type, EVENTS_DMA.TX.READY) , NRF_TWIS_EVENT_WRITE = offsetof(NRF_TWIS_Type, EVENTS_WRITE) , NRF_TWIS_EVENT_READ = offsetof(NRF_TWIS_Type, EVENTS_READ) } |
TWIS events. More... | |
enum | nrf_twis_short_mask_t { NRF_TWIS_SHORT_WRITE_SUSPEND_MASK = TWIS_SHORTS_WRITE_SUSPEND_Msk , NRF_TWIS_SHORT_READ_SUSPEND_MASK = TWIS_SHORTS_READ_SUSPEND_Msk } |
TWIS shortcuts. More... | |
enum | nrf_twis_int_mask_t { NRF_TWIS_INT_STOPPED_MASK = TWIS_INTEN_STOPPED_Msk , NRF_TWIS_INT_ERROR_MASK = TWIS_INTEN_ERROR_Msk , NRF_TWIS_INT_RXSTARTED_MASK = TWIS_INTEN_DMARXREADY_Msk , NRF_TWIS_INT_TXSTARTED_MASK = TWIS_INTEN_DMATXREADY_Msk , NRF_TWIS_INT_WRITE_MASK = TWIS_INTEN_WRITE_Msk , NRF_TWIS_INT_READ_MASK = TWIS_INTEN_READ_Msk } |
TWIS interrupts. More... | |
enum | nrf_twis_error_t { NRF_TWIS_ERROR_OVERFLOW = TWIS_ERRORSRC_OVERFLOW_Msk , NRF_TWIS_ERROR_DATA_NACK = TWIS_ERRORSRC_DNACK_Msk , NRF_TWIS_ERROR_OVERREAD = TWIS_ERRORSRC_OVERREAD_Msk } |
TWIS error source. More... | |
enum | nrf_twis_config_addr_mask_t { NRF_TWIS_CONFIG_ADDRESS0_MASK = TWIS_CONFIG_ADDRESS0_Msk , NRF_TWIS_CONFIG_ADDRESS1_MASK = TWIS_CONFIG_ADDRESS1_Msk , NRF_TWIS_CONFIG_ADDRESS01_MASK } |
TWIS address matching configuration. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_twis_task_trigger (NRF_TWIS_Type *p_reg, nrf_twis_task_t task) |
Function for activating the specified TWIS task. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_task_address_get (NRF_TWIS_Type const *p_reg, nrf_twis_task_t task) |
Function for returning the address of the specified TWIS task register. | |
NRF_STATIC_INLINE void | nrf_twis_event_clear (NRF_TWIS_Type *p_reg, nrf_twis_event_t event) |
Function for clearing the specified event. | |
NRF_STATIC_INLINE bool | nrf_twis_event_check (NRF_TWIS_Type const *p_reg, nrf_twis_event_t event) |
Function for retrieving the state of the TWIS event. | |
NRF_STATIC_INLINE bool | nrf_twis_event_get_and_clear (NRF_TWIS_Type *p_reg, nrf_twis_event_t event) |
Function for getting and clearing the state of the specified event. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_event_address_get (NRF_TWIS_Type const *p_reg, nrf_twis_event_t event) |
Function for returning the address of the specified TWIS event register. | |
NRF_STATIC_INLINE void | nrf_twis_shorts_enable (NRF_TWIS_Type *p_reg, uint32_t mask) |
Function for setting a shortcut. | |
NRF_STATIC_INLINE void | nrf_twis_shorts_disable (NRF_TWIS_Type *p_reg, uint32_t mask) |
Function for clearing shortcuts. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_shorts_get (NRF_TWIS_Type const *p_reg) |
Function for getting the shorts mask. | |
NRF_STATIC_INLINE void | nrf_twis_int_enable (NRF_TWIS_Type *p_reg, uint32_t mask) |
Function for enabling the specified interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_int_enable_check (NRF_TWIS_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE void | nrf_twis_int_disable (NRF_TWIS_Type *p_reg, uint32_t mask) |
Function for disabling the specified interrupts. | |
NRF_STATIC_INLINE void | nrf_twis_subscribe_set (NRF_TWIS_Type *p_reg, nrf_twis_task_t task, uint8_t channel) |
Function for setting the subscribe configuration for a given TWIS task. | |
NRF_STATIC_INLINE void | nrf_twis_subscribe_clear (NRF_TWIS_Type *p_reg, nrf_twis_task_t task) |
Function for clearing the subscribe configuration for a given TWIS task. | |
NRF_STATIC_INLINE void | nrf_twis_publish_set (NRF_TWIS_Type *p_reg, nrf_twis_event_t event, uint8_t channel) |
Function for setting the publish configuration for a given TWIS event. | |
NRF_STATIC_INLINE void | nrf_twis_publish_clear (NRF_TWIS_Type *p_reg, nrf_twis_event_t event) |
Function for clearing the publish configuration for a given TWIS event. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_error_source_get_and_clear (NRF_TWIS_Type *p_reg) |
Function for retrieving and clearing the TWIS error source. | |
NRF_STATIC_INLINE uint_fast8_t | nrf_twis_match_get (NRF_TWIS_Type const *p_reg) |
Function for getting information about which of the addresses matched. | |
NRF_STATIC_INLINE void | nrf_twis_enable (NRF_TWIS_Type *p_reg) |
Function for enabling TWIS. | |
NRF_STATIC_INLINE void | nrf_twis_disable (NRF_TWIS_Type *p_reg) |
Function for disabling TWIS. | |
NRF_STATIC_INLINE bool | nrf_twis_enable_check (NRF_TWIS_Type const *p_reg) |
Function for checking if the TWIS is enabled. | |
NRF_STATIC_INLINE void | nrf_twis_pins_set (NRF_TWIS_Type *p_reg, uint32_t scl, uint32_t sda) |
Function for configuring TWIS pins. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_scl_pin_get (NRF_TWIS_Type const *p_reg) |
Function for retrieving the SCL pin selection. | |
NRF_STATIC_INLINE uint32_t | nrf_twis_sda_pin_get (NRF_TWIS_Type const *p_reg) |
Function for retrieving the SDA pin selection. | |
NRF_STATIC_INLINE void | nrf_twis_rx_buffer_set (NRF_TWIS_Type *p_reg, uint8_t *p_buf, size_t length) |
Function for setting the receive buffer. | |
NRF_STATIC_INLINE uint8_t * | nrf_twis_rx_buffer_get (NRF_TWIS_Type const *p_reg) |
Function for getting the receive buffer. | |
NRF_STATIC_INLINE void | nrf_twis_rx_prepare (NRF_TWIS_Type *p_reg, uint8_t *p_buf, size_t length) |
Function that prepares TWIS for receiving. | |
NRF_STATIC_INLINE size_t | nrf_twis_rx_amount_get (NRF_TWIS_Type const *p_reg) |
Function for getting number of bytes received in the last transaction. | |
NRF_STATIC_INLINE void | nrf_twis_tx_buffer_set (NRF_TWIS_Type *p_reg, uint8_t const *p_buf, size_t length) |
Function for setting the transmit buffer. | |
NRF_STATIC_INLINE uint8_t * | nrf_twis_tx_buffer_get (NRF_TWIS_Type const *p_reg) |
Function for getting the transmit buffer. | |
NRF_STATIC_INLINE void | nrf_twis_tx_prepare (NRF_TWIS_Type *p_reg, uint8_t const *p_buf, size_t length) |
Function for preparing TWIS for transmitting. | |
NRF_STATIC_INLINE size_t | nrf_twis_tx_amount_get (NRF_TWIS_Type const *p_reg) |
Function for getting the number of bytes transmitted in the last transaction. | |
NRF_STATIC_INLINE void | nrf_twis_address_set (NRF_TWIS_Type *p_reg, uint_fast8_t n, nrf_twis_address_t addr) |
Function for setting the slave address. | |
NRF_STATIC_INLINE nrf_twis_address_t | nrf_twis_address_get (NRF_TWIS_Type const *p_reg, uint_fast8_t n) |
Function for retrieving configured slave address. | |
NRF_STATIC_INLINE void | nrf_twis_config_address_set (NRF_TWIS_Type *p_reg, nrf_twis_config_addr_mask_t addr_mask) |
Function for setting the device address configuration. | |
NRF_STATIC_INLINE nrf_twis_config_addr_mask_t | nrf_twis_config_address_get (NRF_TWIS_Type const *p_reg) |
Function for retrieving the device address configuration. | |
NRF_STATIC_INLINE void | nrf_twis_orc_set (NRF_TWIS_Type *p_reg, uint8_t orc) |
Function for setting the over-read character. | |
NRF_STATIC_INLINE uint8_t | nrf_twis_orc_get (NRF_TWIS_Type const *p_reg) |
Function for setting the over-read character. | |
NRF_STATIC_INLINE void | nrf_twis_tx_list_enable (NRF_TWIS_Type *p_reg) |
Function for enabling the TX list feature. | |
NRF_STATIC_INLINE void | nrf_twis_tx_list_disable (NRF_TWIS_Type *p_reg) |
Function for disabling the TX list feature. | |
NRF_STATIC_INLINE void | nrf_twis_rx_list_enable (NRF_TWIS_Type *p_reg) |
Function for enabling the RX list feature. | |
NRF_STATIC_INLINE void | nrf_twis_rx_list_disable (NRF_TWIS_Type *p_reg) |
Function for disabling the RX list feature. | |
Hardware access layer for managing the Two Wire Interface Slave with EasyDMA (TWIS) peripheral.
#define NRF_TWIS_INST_GET | ( | idx | ) | NRFX_CONCAT(NRF_, TWIS, idx) |
Macro getting pointer to the structure of registers of the TWIS peripheral.
[in] | idx | TWIS instance index. |
typedef uint8_t nrf_twis_address_t |
Smallest variable type to hold the TWI address.
Variable of the minimum size that can hold a single TWI address.
enum nrf_twis_error_t |
enum nrf_twis_event_t |
enum nrf_twis_int_mask_t |
TWIS interrupts.
enum nrf_twis_task_t |
TWIS tasks.
NRF_STATIC_INLINE nrf_twis_address_t nrf_twis_address_get | ( | NRF_TWIS_Type const * | p_reg, |
uint_fast8_t | n | ||
) |
Function for retrieving configured slave address.
Function gets the selected address for this TWI interface.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | n | Index of address to get. |
NRF_STATIC_INLINE void nrf_twis_address_set | ( | NRF_TWIS_Type * | p_reg, |
uint_fast8_t | n, | ||
nrf_twis_address_t | addr | ||
) |
Function for setting the slave address.
Function sets the selected address for this TWI interface.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | n | Index of address to be set. |
[in] | addr | Addres to be set. |
NRF_STATIC_INLINE nrf_twis_config_addr_mask_t nrf_twis_config_address_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for retrieving the device address configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_config_address_set | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_config_addr_mask_t | addr_mask | ||
) |
Function for setting the device address configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | addr_mask | Mask of address indexes of what device should answer to. |
NRF_STATIC_INLINE void nrf_twis_disable | ( | NRF_TWIS_Type * | p_reg | ) |
Function for disabling TWIS.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_enable | ( | NRF_TWIS_Type * | p_reg | ) |
Function for enabling TWIS.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE bool nrf_twis_enable_check | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for checking if the TWIS is enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | The TWIS is enabled. |
false | The TWIS is not enabled. |
NRF_STATIC_INLINE uint32_t nrf_twis_error_source_get_and_clear | ( | NRF_TWIS_Type * | p_reg | ) |
Function for retrieving and clearing the TWIS error source.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_twis_event_address_get | ( | NRF_TWIS_Type const * | p_reg, |
nrf_twis_event_t | event | ||
) |
Function for returning the address of the specified TWIS event register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event. |
NRF_STATIC_INLINE bool nrf_twis_event_check | ( | NRF_TWIS_Type const * | p_reg, |
nrf_twis_event_t | event | ||
) |
Function for retrieving the state of the TWIS 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. |
NRF_STATIC_INLINE void nrf_twis_event_clear | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_event_t | event | ||
) |
Function for clearing the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | The specified event. |
NRF_STATIC_INLINE bool nrf_twis_event_get_and_clear | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_event_t | event | ||
) |
Function for getting and clearing the state of the specified event.
This function checks the state of the event and clears it.
[in,out] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event. |
true | The event was set. |
false | The event was not set. |
NRF_STATIC_INLINE void nrf_twis_int_disable | ( | NRF_TWIS_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling the specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_twis_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_twis_int_enable | ( | NRF_TWIS_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling the specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_twis_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_twis_int_enable_check | ( | NRF_TWIS_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for checking if the specified interrupts are enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. Use nrf_twis_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint_fast8_t nrf_twis_match_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for getting information about which of the addresses matched.
Function returns index in the address table that points to the address that already matched.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint8_t nrf_twis_orc_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for setting the over-read character.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_orc_set | ( | NRF_TWIS_Type * | p_reg, |
uint8_t | orc | ||
) |
Function for setting the over-read character.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | orc | Over-read character. Character clocked out in case of over-read of the TXD buffer. |
NRF_STATIC_INLINE void nrf_twis_pins_set | ( | NRF_TWIS_Type * | p_reg, |
uint32_t | scl, | ||
uint32_t | sda | ||
) |
Function for configuring TWIS pins.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | scl | SCL pin number. |
[in] | sda | SDA pin number. |
NRF_STATIC_INLINE void nrf_twis_publish_clear | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_event_t | event | ||
) |
Function for clearing the publish configuration for a given TWIS event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_twis_publish_set | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the publish configuration for a given TWIS event.
[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. |
NRF_STATIC_INLINE size_t nrf_twis_rx_amount_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for getting number of bytes received in the last transaction.
[in] | p_reg | TWIS instance. |
NRF_STATIC_INLINE uint8_t * nrf_twis_rx_buffer_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for getting the receive buffer.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_rx_buffer_set | ( | NRF_TWIS_Type * | p_reg, |
uint8_t * | p_buf, | ||
size_t | length | ||
) |
Function for setting the receive buffer.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_buf | Pointer to the buffer for received data. |
[in] | length | Maximum number of data bytes to receive. |
NRF_STATIC_INLINE void nrf_twis_rx_list_disable | ( | NRF_TWIS_Type * | p_reg | ) |
Function for disabling the RX list feature.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_rx_list_enable | ( | NRF_TWIS_Type * | p_reg | ) |
Function for enabling the RX list feature.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_rx_prepare | ( | NRF_TWIS_Type * | p_reg, |
uint8_t * | p_buf, | ||
size_t | length | ||
) |
Function that prepares TWIS for receiving.
This function sets receive buffer and then sets NRF_TWIS_TASK_PREPARERX task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_buf | Pointer to the buffer for received data. |
[in] | length | Maximum number of data bytes to receive. |
NRF_STATIC_INLINE uint32_t nrf_twis_scl_pin_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for retrieving the SCL pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_twis_sda_pin_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for retrieving the SDA pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_shorts_disable | ( | NRF_TWIS_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for clearing shortcuts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of shortcuts to be disabled. |
NRF_STATIC_INLINE void nrf_twis_shorts_enable | ( | NRF_TWIS_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for setting a shortcut.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of shortcuts to be enabled. |
NRF_STATIC_INLINE uint32_t nrf_twis_shorts_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for getting the shorts mask.
Function returns shorts register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_subscribe_clear | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_task_t | task | ||
) |
Function for clearing the subscribe configuration for a given TWIS task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_twis_subscribe_set | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the subscribe configuration for a given TWIS task.
[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. |
NRF_STATIC_INLINE uint32_t nrf_twis_task_address_get | ( | NRF_TWIS_Type const * | p_reg, |
nrf_twis_task_t | task | ||
) |
Function for returning the address of the specified TWIS task register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | The specified task. |
NRF_STATIC_INLINE void nrf_twis_task_trigger | ( | NRF_TWIS_Type * | p_reg, |
nrf_twis_task_t | task | ||
) |
Function for activating the specified TWIS task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be activated. |
NRF_STATIC_INLINE size_t nrf_twis_tx_amount_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for getting the number of bytes transmitted in the last transaction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint8_t * nrf_twis_tx_buffer_get | ( | NRF_TWIS_Type const * | p_reg | ) |
Function for getting the transmit buffer.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_tx_buffer_set | ( | NRF_TWIS_Type * | p_reg, |
uint8_t const * | p_buf, | ||
size_t | length | ||
) |
Function for setting the transmit buffer.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_buf | Pointer to the buffer with data to send. |
[in] | length | Maximum number of data bytes to transmit. |
NRF_STATIC_INLINE void nrf_twis_tx_list_disable | ( | NRF_TWIS_Type * | p_reg | ) |
Function for disabling the TX list feature.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_tx_list_enable | ( | NRF_TWIS_Type * | p_reg | ) |
Function for enabling the TX list feature.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_twis_tx_prepare | ( | NRF_TWIS_Type * | p_reg, |
uint8_t const * | p_buf, | ||
size_t | length | ||
) |
Function for preparing TWIS for transmitting.
This function sets transmit buffer and then sets NRF_TWIS_TASK_PREPARETX task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_buf | Pointer to the buffer with data to send. |
[in] | length | Maximum number of data bytes to transmit. |