nrfx 3.3
Data Structures | Macros | Functions
SPIM HALY

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 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 uint32_t nrfy_spim_csn_pin_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)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the SPIM peripheral.

Macro Definition Documentation

◆ NRFY_SPIM_HAS_ARRAY_LIST

#define NRFY_SPIM_HAS_ARRAY_LIST   1
See also
NRF_SPIM_HAS_ARRAY_LIST Symbol indicating whether EasyDMA array list feature is present.

◆ NRFY_SPIM_HAS_DCX

#define NRFY_SPIM_HAS_DCX   1
See also
NRF_SPIM_HAS_DCX Macro for checking if the DCX pin control is available.

◆ NRFY_SPIM_HAS_EXTENDED

#define NRFY_SPIM_HAS_EXTENDED   1
See also
NRF_SPIM_HAS_EXTENDED Symbol indicating whether any of the SPIM extended features is available.

◆ NRFY_SPIM_HAS_FREQUENCY

#define NRFY_SPIM_HAS_FREQUENCY   1
See also
NRF_SPIM_HAS_FREQUENCY Symbol indicating whether frequency is used.

◆ NRFY_SPIM_HAS_HW_CSN

#define NRFY_SPIM_HAS_HW_CSN   1
See also
NRF_SPIM_HAS_HW_CSN Macro for checking if the hardware chip select function is available.

◆ NRFY_SPIM_HAS_PRESCALER

#define NRFY_SPIM_HAS_PRESCALER   1
See also
NRF_SPIM_HAS_PRESCALER Symbol indicating whether prescaler is used.

◆ NRFY_SPIM_HAS_RXDELAY

#define NRFY_SPIM_HAS_RXDELAY   1
See also
NRF_SPIM_HAS_RXDELAY Macro for checking if the RXDELAY function is available.

◆ NRFY_SPIM_HAS_STALLSTAT

#define NRFY_SPIM_HAS_STALLSTAT   1
See also
NRF_SPIM_HAS_STALLSTAT Macro for checking if the STALLSTAT feature is available.

Function Documentation

◆ nrfy_spim_abort()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_xferPointer to the structure containing transaction buffers if the abort is to be blocking. NULL for non-blocking operation.

◆ nrfy_spim_buffers_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_xferPointer to the structure containing transaction buffers.

◆ nrfy_spim_configure()

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 
)
See also
nrf_spim_configure Function for setting the SPI configuration.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]spi_modeSPI mode.
[in]spi_bit_orderSPI bit order.

◆ nrfy_spim_csn_configure()

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 
)
See also
nrf_spim_csn_configure Function for configuring the SPIM hardware CSN pin.

If this signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]pinCSN pin number.
[in]polarityCSN pin polarity.
[in]durationMinimum duration between the edge of CSN and the edge of SCK and minimum duration of CSN must stay unselected between transactions. The value is specified in number of 64 MHz clock cycles (15.625 ns).

◆ nrfy_spim_csn_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_csn_pin_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_csn_pin_get Function for getting the CSN pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
CSN pin selection.

◆ nrfy_spim_dcx_cnt_set()

NRFY_STATIC_INLINE void nrfy_spim_dcx_cnt_set ( NRF_SPIM_Type *  p_reg,
uint32_t  count 
)
See also
nrf_spim_dcx_cnt_set Function for configuring the number of command bytes.

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]countNumber of command bytes preceding the data bytes.

◆ nrfy_spim_dcx_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_dcx_pin_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_dcx_pin_get Function for getting the DCX pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
DCX pin selection.

◆ nrfy_spim_dcx_pin_set()

NRFY_STATIC_INLINE void nrfy_spim_dcx_pin_set ( NRF_SPIM_Type *  p_reg,
uint32_t  dcx_pin 
)
See also
nrf_spim_dcx_pin_set Function for configuring the SPIM DCX pin.

If this signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]dcx_pinDCX pin number.

◆ nrfy_spim_disable()

NRFY_STATIC_INLINE void nrfy_spim_disable ( NRF_SPIM_Type *  p_reg)
See also
nrf_spim_disable Function for disabling the SPIM peripheral.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_spim_enable()

NRFY_STATIC_INLINE void nrfy_spim_enable ( NRF_SPIM_Type *  p_reg)
See also
nrf_spim_enable Function for enabling the SPIM peripheral.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_spim_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_event_address_get ( NRF_SPIM_Type const *  p_reg,
nrf_spim_event_t  event 
)
See also
nrf_spim_event_address_get Function for getting the address of the specified SPIM event register.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventThe specified event.
Returns
Address of the specified event register.

◆ nrfy_spim_event_check()

NRFY_STATIC_INLINE bool nrfy_spim_event_check ( NRF_SPIM_Type const *  p_reg,
nrf_spim_event_t  event 
)
See also
nrf_spim_event_check Function for retrieving the state of the SPIM event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrfy_spim_event_clear()

NRFY_STATIC_INLINE void nrfy_spim_event_clear ( NRF_SPIM_Type *  p_reg,
nrf_spim_event_t  event 
)
See also
nrf_spim_event_clear Function for clearing the specified SPIM event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be cleared.

◆ nrfy_spim_events_process()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK();
[in]p_xferPointer to the structure containing buffers associated with the last transaction. 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_spim_ext_pins_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_pinsPointer to the structure to be filled with SPIM pins configuration.

◆ nrfy_spim_frequency_set()

NRFY_STATIC_INLINE void nrfy_spim_frequency_set ( NRF_SPIM_Type *  p_reg,
nrf_spim_frequency_t  frequency 
)
See also
nrf_spim_frequency_set Function for setting the SPI master data rate.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]frequencySPI frequency.

◆ nrfy_spim_iftiming_set()

NRFY_STATIC_INLINE void nrfy_spim_iftiming_set ( NRF_SPIM_Type *  p_reg,
uint32_t  rxdelay 
)
See also
nrf_spim_iftiming_set Function for configuring the extended SPIM interface.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]rxdelaySample delay for input serial data on MISO, specified in 64 MHz clock cycles (15.625 ns) from the sampling edge of SCK.

◆ nrfy_spim_int_disable()

NRFY_STATIC_INLINE void nrfy_spim_int_disable ( NRF_SPIM_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_spim_int_disable Function for disabling the specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_spim_int_mask_t values for bit masking.

◆ nrfy_spim_int_enable()

NRFY_STATIC_INLINE void nrfy_spim_int_enable ( NRF_SPIM_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_spim_int_enable Function for enabling the specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_spim_int_mask_t values for bit masking.

◆ nrfy_spim_int_enable_check()

NRFY_STATIC_INLINE uint32_t nrfy_spim_int_enable_check ( NRF_SPIM_Type const *  p_reg,
uint32_t  mask 
)
See also
nrf_spim_int_enable_check Function for checking if the specified interrupts are enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_spim_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrfy_spim_int_init()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if interrupts associated with the event mask are to be enabled, false otherwise.

◆ nrfy_spim_int_uninit()

NRFY_STATIC_INLINE void nrfy_spim_int_uninit ( NRF_SPIM_Type *  p_reg)

Function for uninitializing the SPIM interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_spim_miso_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_miso_pin_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_miso_pin_get Function for getting the MISO pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
MISO pin selection.

◆ nrfy_spim_mosi_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_mosi_pin_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_mosi_pin_get Function for getting the MOSI pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
MOSI pin selection.

◆ nrfy_spim_orc_set()

NRFY_STATIC_INLINE void nrfy_spim_orc_set ( NRF_SPIM_Type *  p_reg,
uint8_t  orc 
)
See also
nrf_spim_orc_set Function for setting the over-read character.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]orcOver-read character that is clocked out in case of an over-read of the TXD buffer.

◆ nrfy_spim_periph_configure()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the peripheral configuration structure.

◆ nrfy_spim_pins_get()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_pinsPointer to the structure to be filled with SPIM pins configuration.

◆ nrfy_spim_pins_set()

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 
)
See also
nrf_spim_pins_set Function for configuring SPIM pins.

If a given signal is not needed, pass the NRF_SPIM_PIN_NOT_CONNECTED value instead of its pin number.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]sck_pinSCK pin number.
[in]mosi_pinMOSI pin number.
[in]miso_pinMISO pin number.

◆ nrfy_spim_prescaler_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_prescaler_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_prescaler_get Function for getting the prescaler value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Prescaler value.

◆ nrfy_spim_prescaler_set()

NRFY_STATIC_INLINE void nrfy_spim_prescaler_set ( NRF_SPIM_Type *  p_reg,
uint32_t  prescaler 
)
See also
nrf_spim_prescaler_set Function for setting the prescaler value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]prescalerPrescaler value.

◆ nrfy_spim_publish_clear()

NRFY_STATIC_INLINE void nrfy_spim_publish_clear ( NRF_SPIM_Type *  p_reg,
nrf_spim_event_t  event 
)
See also
nrf_spim_publish_clear Function for clearing the publish configuration for a given SPIM event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrfy_spim_publish_set()

NRFY_STATIC_INLINE void nrfy_spim_publish_set ( NRF_SPIM_Type *  p_reg,
nrf_spim_event_t  event,
uint8_t  channel 
)
See also
nrf_spim_publish_set Function for setting the publish configuration for a given SPIM event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrfy_spim_rx_amount_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_rx_amount_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_tx_amount_get Function for getting number of bytes transmitted in the last transaction.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Amountof bytes transmitted.

◆ nrfy_spim_rx_buffer_set()

NRFY_STATIC_INLINE void nrfy_spim_rx_buffer_set ( NRF_SPIM_Type *  p_reg,
uint8_t *  p_buffer,
size_t  length 
)
See also
nrf_spim_rx_buffer_set Function for setting the receive buffer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the buffer for received data.
[in]lengthMaximum number of data bytes to receive.

◆ nrfy_spim_rx_list_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if RX list feature is to be enabled, false otherwise.

◆ nrfy_spim_rx_maxcnt_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_rx_maxcnt_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_rx_maxcnt_get Function for getting number of bytes to be received in the next transaction.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Amountof bytes to be received.

◆ nrfy_spim_sck_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_sck_pin_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_sck_pin_get Function for getting the SCK pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
SCK pin selection.

◆ nrfy_spim_shorts_disable()

NRFY_STATIC_INLINE void nrfy_spim_shorts_disable ( NRF_SPIM_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_spim_shorts_disable Function for disabling the specified shortcuts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskShortcuts to be disabled.

◆ nrfy_spim_shorts_enable()

NRFY_STATIC_INLINE void nrfy_spim_shorts_enable ( NRF_SPIM_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_spim_shorts_enable Function for enabling the specified shortcuts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskShortcuts to be enabled.

◆ nrfy_spim_shorts_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_shorts_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_shorts_get Function for getting the shortcut setting.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Current shortcut configuration.

◆ nrfy_spim_stallstat_rx_clear()

NRFY_STATIC_INLINE void nrfy_spim_stallstat_rx_clear ( NRF_SPIM_Type *  p_reg)
See also
nrf_spim_stallstat_rx_clear Function for clearing stall status for RX EasyDMA RAM accesses.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_spim_stallstat_rx_get()

NRFY_STATIC_INLINE bool nrfy_spim_stallstat_rx_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_stallstat_rx_get Function for getting stall status for RX EasyDMA RAM accesses.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Stall status of RX EasyDMA RAM accesses.

◆ nrfy_spim_stallstat_tx_clear()

NRFY_STATIC_INLINE void nrfy_spim_stallstat_tx_clear ( NRF_SPIM_Type *  p_reg)
See also
nrf_spim_stallstat_tx_clear Function for clearing stall status for TX EasyDMA RAM accesses.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_spim_stallstat_tx_get()

NRFY_STATIC_INLINE bool nrfy_spim_stallstat_tx_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_stallstat_tx_get Function for getting stall status for TX EasyDMA RAM accesses.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Stall status of TX EasyDMA RAM accesses.

◆ nrfy_spim_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_spim_subscribe_clear ( NRF_SPIM_Type *  p_reg,
nrf_spim_task_t  task 
)
See also
nrf_spim_subscribe_clear Function for clearing the subscribe configuration for a given SPIM task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrfy_spim_subscribe_set()

NRFY_STATIC_INLINE void nrfy_spim_subscribe_set ( NRF_SPIM_Type *  p_reg,
nrf_spim_task_t  task,
uint8_t  channel 
)
See also
nrf_spim_subscribe_set Function for setting the subscribe configuration for a given SPIM task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrfy_spim_task_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_task_address_get ( NRF_SPIM_Type const *  p_reg,
nrf_spim_task_t  task 
)
See also
nrf_spim_task_address_get Function for getting the address of the specified SPIM task register.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskThe specified task.
Returns
Address of the specified task register.

◆ nrfy_spim_task_trigger()

NRFY_STATIC_INLINE void nrfy_spim_task_trigger ( NRF_SPIM_Type *  p_reg,
nrf_spim_task_t  task 
)
See also
nrf_spim_task_trigger Function for activating the specified SPIM task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask to be activated.

◆ nrfy_spim_tx_amount_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_tx_amount_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_tx_amount_get Function for getting number of bytes transmitted in the last transaction.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Amountof bytes transmitted.

◆ nrfy_spim_tx_buffer_set()

NRFY_STATIC_INLINE void nrfy_spim_tx_buffer_set ( NRF_SPIM_Type *  p_reg,
uint8_t const *  p_buffer,
size_t  length 
)
See also
nrf_spim_tx_buffer_set Function for setting the transmit buffer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the buffer with data to send.
[in]lengthMaximum number of data bytes to transmit.

◆ nrfy_spim_tx_list_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if TX list feature is to be enabled, false otherwise.

◆ nrfy_spim_tx_maxcnt_get()

NRFY_STATIC_INLINE uint32_t nrfy_spim_tx_maxcnt_get ( NRF_SPIM_Type const *  p_reg)
See also
nrf_spim_tx_maxcnt_get Function for getting number of bytes to be transmitted in the next transaction.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Amountof bytes to be transmitted.

◆ nrfy_spim_xfer_start()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_xferPointer to the structure containing transaction buffers if the transaction is to be blocking. NULL for non-blocking transactions.

Documentation feedback | Developer Zone | Subscribe | Updated