![]() |
nrfx 4.5.0
|
Hardware access layer with cache and barrier support for managing the SPIM peripheral. More...
Data Structures | |
| struct | nrfy_spim_xfer_desc_t |
| Structure describing single SPIM transfer. More... | |
| struct | nrfy_spim_ext_pins_t |
| Configuration structure for SPIM pins used for extended features. More... | |
| struct | nrfy_spim_ext_config_t |
| Configuration structure for SPIM extended features. More... | |
| struct | nrfy_spim_pins_t |
| SPIM pins configuration structure. More... | |
| struct | nrfy_spim_config_t |
| SPIM configuration structure. More... | |
Macros | |
| #define | NRFY_SPIM_HAS_HW_CSN 1 |
| #define | NRFY_SPIM_HAS_DCX 1 |
| #define | NRFY_SPIM_HAS_RXDELAY 1 |
| #define | NRFY_SPIM_HAS_STALLSTAT 1 |
| #define | NRFY_SPIM_HAS_EXTENDED 1 |
| #define | NRFY_SPIM_HAS_ARRAY_LIST 1 |
| #define | NRFY_SPIM_HAS_FREQUENCY 1 |
| #define | NRFY_SPIM_HAS_PRESCALER 1 |
Functions | |
| NRFY_STATIC_INLINE void | nrfy_spim_periph_configure (NRF_SPIM_Type *p_reg, nrfy_spim_config_t const *p_config) |
| Function for configuring the SPIM. | |
| NRFY_STATIC_INLINE void | nrfy_spim_int_init (NRF_SPIM_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable) |
| Function for initializing the specified SPIM interrupts. | |
| NRFY_STATIC_INLINE void | nrfy_spim_int_uninit (NRF_SPIM_Type *p_reg) |
| Function for uninitializing the SPIM interrupts. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_events_process (NRF_SPIM_Type *p_reg, uint32_t mask, nrfy_spim_xfer_desc_t const *p_xfer) |
| Function for processing the specified SPIM events. | |
| NRFY_STATIC_INLINE void | nrfy_spim_buffers_set (NRF_SPIM_Type *p_reg, nrfy_spim_xfer_desc_t const *p_xfer) |
| Function for setting the SPIM transaction buffers. | |
| NRFY_STATIC_INLINE void | nrfy_spim_xfer_start (NRF_SPIM_Type *p_reg, nrfy_spim_xfer_desc_t const *p_xfer) |
| Function for starting the SPIM transaction. | |
| NRFY_STATIC_INLINE void | nrfy_spim_abort (NRF_SPIM_Type *p_reg, nrfy_spim_xfer_desc_t const *p_xfer) |
| Function for aborting the ongoing SPIM transaction. | |
| NRFY_STATIC_INLINE void | nrfy_spim_pins_get (NRF_SPIM_Type const *p_reg, nrfy_spim_pins_t *p_pins) |
| Function for getting the SPIM pins configuration. | |
| NRFY_STATIC_INLINE void | nrfy_spim_ext_pins_get (NRF_SPIM_Type const *p_reg, nrfy_spim_ext_pins_t *p_pins) |
| Function for getting the configuration of the SPIM pins used for extended features. | |
| NRFY_STATIC_INLINE void | nrfy_spim_tx_list_set (NRF_SPIM_Type *p_reg, bool enable) |
| Function for enabling or disabling the TX list feature. | |
| NRFY_STATIC_INLINE void | nrfy_spim_rx_list_set (NRF_SPIM_Type *p_reg, bool enable) |
| Function for enabling or disabling the RX list feature. | |
| NRFY_STATIC_INLINE void | nrfy_spim_task_trigger (NRF_SPIM_Type *p_reg, nrf_spim_task_t task) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_task_address_get (NRF_SPIM_Type const *p_reg, nrf_spim_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_spim_event_clear (NRF_SPIM_Type *p_reg, nrf_spim_event_t event) |
| NRFY_STATIC_INLINE bool | nrfy_spim_event_check (NRF_SPIM_Type const *p_reg, nrf_spim_event_t event) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_event_address_get (NRF_SPIM_Type const *p_reg, nrf_spim_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_spim_shorts_enable (NRF_SPIM_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_spim_shorts_disable (NRF_SPIM_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_shorts_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_int_enable (NRF_SPIM_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_spim_int_disable (NRF_SPIM_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_int_enable_check (NRF_SPIM_Type const *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_spim_subscribe_set (NRF_SPIM_Type *p_reg, nrf_spim_task_t task, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_spim_subscribe_clear (NRF_SPIM_Type *p_reg, nrf_spim_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_spim_publish_set (NRF_SPIM_Type *p_reg, nrf_spim_event_t event, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_spim_publish_clear (NRF_SPIM_Type *p_reg, nrf_spim_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_spim_enable (NRF_SPIM_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_disable (NRF_SPIM_Type *p_reg) |
| NRFY_STATIC_INLINE bool | nrfy_spim_enable_check (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_pins_set (NRF_SPIM_Type *p_reg, uint32_t sck_pin, uint32_t mosi_pin, uint32_t miso_pin) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_sck_pin_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_mosi_pin_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_miso_pin_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_csn_configure (NRF_SPIM_Type *p_reg, uint32_t pin, nrf_spim_csn_pol_t polarity, uint32_t duration) |
| NRFY_STATIC_INLINE void | nrfy_spim_csn_duration_set (NRF_SPIM_Type *p_reg, uint32_t duration) |
| NRF_STATIC_INLINE uint32_t | nrfy_spim_csn_duration_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_csn_pin_set (NRF_SPIM_Type *p_reg, uint32_t pin) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_csn_pin_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_csn_polarity_set (NRF_SPIM_Type *p_reg, nrf_spim_csn_pol_t polarity) |
| NRFY_STATIC_INLINE nrf_spim_csn_pol_t | nrfy_spim_csn_polarity_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_dcx_pin_set (NRF_SPIM_Type *p_reg, uint32_t dcx_pin) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_dcx_pin_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_dcx_cnt_set (NRF_SPIM_Type *p_reg, uint32_t count) |
| NRFY_STATIC_INLINE void | nrfy_spim_iftiming_set (NRF_SPIM_Type *p_reg, uint32_t rxdelay) |
| NRFY_STATIC_INLINE void | nrfy_spim_stallstat_rx_clear (NRF_SPIM_Type *p_reg) |
| NRFY_STATIC_INLINE bool | nrfy_spim_stallstat_rx_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_stallstat_tx_clear (NRF_SPIM_Type *p_reg) |
| NRFY_STATIC_INLINE bool | nrfy_spim_stallstat_tx_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_frequency_set (NRF_SPIM_Type *p_reg, nrf_spim_frequency_t frequency) |
| NRFY_STATIC_INLINE void | nrfy_spim_prescaler_set (NRF_SPIM_Type *p_reg, uint32_t prescaler) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_prescaler_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_tx_buffer_set (NRF_SPIM_Type *p_reg, uint8_t const *p_buffer, size_t length) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_tx_amount_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_tx_maxcnt_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_rx_buffer_set (NRF_SPIM_Type *p_reg, uint8_t *p_buffer, size_t length) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_rx_amount_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_spim_rx_maxcnt_get (NRF_SPIM_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_spim_configure (NRF_SPIM_Type *p_reg, nrf_spim_mode_t spi_mode, nrf_spim_bit_order_t spi_bit_order) |
| NRFY_STATIC_INLINE void | nrfy_spim_orc_set (NRF_SPIM_Type *p_reg, uint8_t orc) |
Hardware access layer with cache and barrier support for managing the SPIM peripheral.
| #define NRFY_SPIM_HAS_ARRAY_LIST 1 |
| #define NRFY_SPIM_HAS_DCX 1 |
| #define NRFY_SPIM_HAS_EXTENDED 1 |
| #define NRFY_SPIM_HAS_FREQUENCY 1 |
| #define NRFY_SPIM_HAS_HW_CSN 1 |
| #define NRFY_SPIM_HAS_PRESCALER 1 |
| #define NRFY_SPIM_HAS_RXDELAY 1 |
| #define NRFY_SPIM_HAS_STALLSTAT 1 |
| NRFY_STATIC_INLINE void nrfy_spim_abort | ( | NRF_SPIM_Type * | p_reg, |
| nrfy_spim_xfer_desc_t const * | p_xfer ) |
Function for aborting the ongoing SPIM transaction.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing transaction buffers if the abort is to be blocking. NULL for non-blocking operation. |
| NRFY_STATIC_INLINE void nrfy_spim_buffers_set | ( | NRF_SPIM_Type * | p_reg, |
| nrfy_spim_xfer_desc_t const * | p_xfer ) |
Function for setting the SPIM transaction buffers.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing transaction buffers. |
| NRFY_STATIC_INLINE void nrfy_spim_configure | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_mode_t | spi_mode, | ||
| nrf_spim_bit_order_t | spi_bit_order ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | spi_mode | SPI mode. |
| [in] | spi_bit_order | SPI bit order. |
| NRFY_STATIC_INLINE void nrfy_spim_csn_configure | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | pin, | ||
| nrf_spim_csn_pol_t | polarity, | ||
| uint32_t | duration ) |
If this signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pin | CSN pin number. |
| [in] | polarity | CSN pin polarity. |
| [in] | duration | Minimum duration between the edge of CSN and the edge of SCK. Also, minimum duration of CSN to remain unasserted between transactions. The value is specified in number of SPIM core clock cycles. |
| NRF_STATIC_INLINE uint32_t nrfy_spim_csn_duration_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_csn_duration_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | duration ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | duration | Minimum duration between the edge of CSN and the edge of SCK Also, minimum duration of CSN to remain unasserted between transactions. The value is specified in number of SPIM core clock cycles. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_csn_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_csn_pin_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | pin ) |
If this signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pin | CSN pin number. |
| NRFY_STATIC_INLINE nrf_spim_csn_pol_t nrfy_spim_csn_polarity_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_csn_polarity_set | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_csn_pol_t | polarity ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | polarity | CSN pin polarity. |
| NRFY_STATIC_INLINE void nrfy_spim_dcx_cnt_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | count ) |
Maximum value available for dividing the transmitted bytes into command bytes and data bytes is NRF_SPIM_DCX_CNT_ALL_CMD - 1. The NRF_SPIM_DCX_CNT_ALL_CMD value passed as the count parameter causes all transmitted bytes to be marked as command bytes.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | count | Number of command bytes preceding the data bytes. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_dcx_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_dcx_pin_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | dcx_pin ) |
If this signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | dcx_pin | DCX pin number. |
| NRFY_STATIC_INLINE void nrfy_spim_disable | ( | NRF_SPIM_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_enable | ( | NRF_SPIM_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE bool nrfy_spim_enable_check | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The SPIM is enabled. |
| false | The SPIM is not enabled. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_event_address_get | ( | NRF_SPIM_Type const * | p_reg, |
| nrf_spim_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_spim_event_check | ( | NRF_SPIM_Type const * | p_reg, |
| nrf_spim_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_spim_event_clear | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be cleared. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_events_process | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | mask, | ||
| nrfy_spim_xfer_desc_t const * | p_xfer ) |
Function for processing the specified SPIM 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 buffers associated with the last transaction. Can be NULL. |
| NRFY_STATIC_INLINE void nrfy_spim_ext_pins_get | ( | NRF_SPIM_Type const * | p_reg, |
| nrfy_spim_ext_pins_t * | p_pins ) |
Function for getting the configuration of the SPIM pins used for extended features.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [out] | p_pins | Pointer to the structure to be filled with SPIM pins configuration. |
| NRFY_STATIC_INLINE void nrfy_spim_frequency_set | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_frequency_t | frequency ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | frequency | SPI frequency. |
| NRFY_STATIC_INLINE void nrfy_spim_iftiming_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | rxdelay ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | rxdelay | Sample delay for input serial data on MISO, specified in 64 MHz clock cycles (15.625 ns) from the sampling edge of SCK. |
| NRFY_STATIC_INLINE void nrfy_spim_int_disable | ( | NRF_SPIM_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_spim_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_spim_int_enable | ( | NRF_SPIM_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_spim_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_int_enable_check | ( | NRF_SPIM_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_spim_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_spim_int_init | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | mask, | ||
| uint8_t | irq_priority, | ||
| bool | enable ) |
Function for initializing the specified SPIM 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_spim_int_uninit | ( | NRF_SPIM_Type * | p_reg | ) |
Function for uninitializing the SPIM interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_miso_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_mosi_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_orc_set | ( | NRF_SPIM_Type * | p_reg, |
| uint8_t | orc ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | orc | Over-read character that is clocked out in case of an over-read of the TXD buffer. |
| NRFY_STATIC_INLINE void nrfy_spim_periph_configure | ( | NRF_SPIM_Type * | p_reg, |
| nrfy_spim_config_t const * | p_config ) |
Function for configuring the SPIM.
| [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_spim_pins_get | ( | NRF_SPIM_Type const * | p_reg, |
| nrfy_spim_pins_t * | p_pins ) |
Function for getting the SPIM pins configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [out] | p_pins | Pointer to the structure to be filled with SPIM pins configuration. |
| NRFY_STATIC_INLINE void nrfy_spim_pins_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | sck_pin, | ||
| uint32_t | mosi_pin, | ||
| uint32_t | miso_pin ) |
If a given signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | sck_pin | SCK pin number. |
| [in] | mosi_pin | MOSI pin number. |
| [in] | miso_pin | MISO pin number. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_prescaler_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_prescaler_set | ( | NRF_SPIM_Type * | p_reg, |
| uint32_t | prescaler ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | prescaler | Prescaler value. |
| NRFY_STATIC_INLINE void nrfy_spim_publish_clear | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_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_spim_publish_set | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_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_spim_rx_amount_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Amount | of bytes transmitted. |
| NRFY_STATIC_INLINE void nrfy_spim_rx_buffer_set | ( | NRF_SPIM_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 void nrfy_spim_rx_list_set | ( | NRF_SPIM_Type * | p_reg, |
| bool | enable ) |
Function for enabling or disabling the RX list feature.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if RX list feature is to be enabled, false otherwise. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_rx_maxcnt_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Amount | of bytes to be received. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_sck_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_shorts_disable | ( | NRF_SPIM_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_spim_shorts_enable | ( | NRF_SPIM_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_spim_shorts_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_stallstat_rx_clear | ( | NRF_SPIM_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE bool nrfy_spim_stallstat_rx_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_stallstat_tx_clear | ( | NRF_SPIM_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE bool nrfy_spim_stallstat_tx_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_spim_subscribe_clear | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_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_spim_subscribe_set | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_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_spim_task_address_get | ( | NRF_SPIM_Type const * | p_reg, |
| nrf_spim_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | The specified task. |
| NRFY_STATIC_INLINE void nrfy_spim_task_trigger | ( | NRF_SPIM_Type * | p_reg, |
| nrf_spim_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task to be activated. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_tx_amount_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Amount | of bytes transmitted. |
| NRFY_STATIC_INLINE void nrfy_spim_tx_buffer_set | ( | NRF_SPIM_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 void nrfy_spim_tx_list_set | ( | NRF_SPIM_Type * | p_reg, |
| bool | enable ) |
Function for enabling or disabling the TX list feature.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if TX list feature is to be enabled, false otherwise. |
| NRFY_STATIC_INLINE uint32_t nrfy_spim_tx_maxcnt_get | ( | NRF_SPIM_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Amount | of bytes to be transmitted. |
| NRFY_STATIC_INLINE void nrfy_spim_xfer_start | ( | NRF_SPIM_Type * | p_reg, |
| nrfy_spim_xfer_desc_t const * | p_xfer ) |
Function for starting the SPIM transaction.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing transaction buffers if the transaction is to be blocking. NULL for non-blocking transactions. |