Hardware access layer for managing the SPIM peripheral. More...
Macros | |
#define | NRF_SPIM_INST_GET(idx) NRFX_CONCAT(NRF_, SPIM, idx) |
Macro getting pointer to the structure of registers of the SPIM peripheral. | |
#define | NRF_SPIM_HAS_16_MHZ_FREQ 1 |
Symbol indicating whether 16 MHz clock frequency is available. | |
#define | NRF_SPIM_HAS_32_MHZ_FREQ 1 |
Symbol indicating whether 32 MHz clock frequency is available. | |
#define | NRF_SPIM_HAS_FREQUENCY 1 |
Symbol indicating whether frequency is used. | |
#define | NRF_SPIM_HAS_PRESCALER 1 |
Symbol indicating whether prescaler is used. | |
#define | NRF_SPIM_HAS_ARRAY_LIST 1 |
Symbol indicating whether EasyDMA array list feature is present. | |
#define | NRF_SPIM_HAS_DMA_REG 1 |
Symbol indicating whether dedicated DMA register is present. | |
#define | NRF_SPIM_HAS_DMA_TASKS_EVENTS 1 |
Symbol indicating whether SPIM DMA tasks and events are present. | |
#define | NRF_SPIM_HAS_HW_CSN 1 |
Macro for checking if the hardware chip select function is available. | |
#define | NRF_SPIM_HAS_DCX 1 |
Macro for checking if the DCX pin control is available. | |
#define | NRF_SPIM_HAS_RXDELAY 1 |
Macro for checking if the RXDELAY function is available. | |
#define | NRF_SPIM_HAS_STALLSTAT 1 |
Macro for checking if the STALLSTAT feature is available. | |
#define | NRF_SPIM_HAS_EXTENDED 1 |
Symbol indicating whether any of the SPIM extended features is available. | |
#define | NRF_SPIM_DCX_CNT_ALL_CMD 0xF |
This value specified in the DCX line configuration causes this line to be set low during whole transmission (all transmitted bytes are marked as command bytes). Any lower value causes the DCX line to be switched from low to high after this number of bytes is transmitted (all remaining bytes are marked as data bytes). | |
#define | NRF_SPIM_PIN_NOT_CONNECTED 0xFFFFFFFF |
This value can be used as a parameter for the nrf_spim_pins_set function to specify that a given SPI signal (SCK, MOSI, or MISO) shall not be connected to a physical pin. | |
#define | NRF_SPIM_DMA_RX_PATTERN_MAX_COUNT SPIM_DMA_RX_MATCH_CANDIDATE_MaxCount |
Max number of RX patterns. | |
#define | NRF_SPIM_MIN_FREQUENCY (NRFX_KHZ_TO_HZ(125UL)) |
Minimal SPIM frequency in Hz. | |
#define | NRF_SPIM_BASE_FREQUENCY_320MHZ (NRFX_MHZ_TO_HZ(320UL)) |
Base frequency value 320 MHz for SPIM. | |
#define | NRF_SPIM_BASE_FREQUENCY_192MHZ (NRFX_MHZ_TO_HZ(192UL)) |
Base frequency value 192 MHz for SPIM. | |
#define | NRF_SPIM_BASE_FREQUENCY_128MHZ (NRFX_MHZ_TO_HZ(128UL)) |
Base frequency value 128 MHz for SPIM. | |
#define | NRF_SPIM_BASE_FREQUENCY_64MHZ (NRFX_MHZ_TO_HZ(64UL)) |
Base frequency value 64 MHz for SPIM. | |
#define | NRF_SPIM_BASE_FREQUENCY_32MHZ (NRFX_MHZ_TO_HZ(32UL)) |
Base frequency value 32 MHz for SPIM. | |
#define | NRF_SPIM_BASE_FREQUENCY_16MHZ (NRFX_MHZ_TO_HZ(16UL)) |
Base frequency value 16 MHz for SPIM. | |
#define | NRF_SPIM_IS_320MHZ_SPIM(p_reg) |
Macro for checking whether the base frequency for the specified SPIM instance is 320 MHz. | |
#define | NRF_SPIM_IS_192MHZ_SPIM(p_reg) false |
Macro for checking whether the base frequency for the specified SPIM instance is 192 MHz. | |
#define | NRF_SPIM_IS_128MHZ_SPIM(p_reg) |
Macro for checking whether the base frequency for the specified SPIM instance is 128 MHz. | |
#define | NRF_SPIM_IS_64MHZ_SPIM(p_reg) |
Macro for checking whether the base frequency for the specified SPIM instance is 64 MHz. | |
#define | NRF_SPIM_IS_32MHZ_SPIM(p_reg) false |
Macro for checking whether the base frequency for the specified SPIM instance is 32 MHz. | |
#define | NRF_SPIM_BASE_FREQUENCY_GET(p_reg) |
Macro for getting base frequency value in Hz for the specified SPIM instance. | |
#define | NRF_SPIM_PRESCALER_MAX_GET(p_reg) |
Macro for getting the maximum value of PRESCALER register. | |
#define | NRF_SPIM_PRESCALER_MIN_GET(p_reg) |
Macro for getting the minimum value of PRESCALER register. | |
#define | NRF_SPIM_PRESCALER_CALCULATE(p_reg, frequency) ((uint32_t)(NRF_SPIM_BASE_FREQUENCY_GET(p_reg)) / (uint32_t)(frequency)) |
Macro for computing prescaler value for a given SPIM instance and desired frequency. | |
#define | NRF_SPIM_FREQUENCY_STATIC_CHECK(p_reg, frequency) |
Macro for checking whether specified frequency can be achieved for a given SPIM instance. | |
Enumerations | |
enum | nrf_spim_task_t { NRF_SPIM_TASK_START = offsetof(NRF_SPIM_Type, TASKS_START) , NRF_SPIM_TASK_STOP = offsetof(NRF_SPIM_Type, TASKS_STOP) , NRF_SPIM_TASK_SUSPEND = offsetof(NRF_SPIM_Type, TASKS_SUSPEND) , NRF_SPIM_TASK_RESUME = offsetof(NRF_SPIM_Type, TASKS_RESUME) , NRF_SPIM_TASK_ENABLERXMATCH0 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.ENABLEMATCH[0]) , NRF_SPIM_TASK_ENABLERXMATCH1 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.ENABLEMATCH[1]) , NRF_SPIM_TASK_ENABLERXMATCH2 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.ENABLEMATCH[2]) , NRF_SPIM_TASK_ENABLERXMATCH3 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.ENABLEMATCH[3]) , NRF_SPIM_TASK_DISABLERXMATCH0 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.DISABLEMATCH[0]) , NRF_SPIM_TASK_DISABLERXMATCH1 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.DISABLEMATCH[1]) , NRF_SPIM_TASK_DISABLERXMATCH2 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.DISABLEMATCH[2]) , NRF_SPIM_TASK_DISABLERXMATCH3 = offsetof(NRF_SPIM_Type, TASKS_DMA.RX.DISABLEMATCH[3]) } |
SPIM tasks. More... | |
enum | nrf_spim_event_t { NRF_SPIM_EVENT_STARTED = offsetof(NRF_SPIM_Type, EVENTS_STARTED) , NRF_SPIM_EVENT_STOPPED = offsetof(NRF_SPIM_Type, EVENTS_STOPPED) , NRF_SPIM_EVENT_RXSTARTED = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.READY) , NRF_SPIM_EVENT_RXBUSERROR = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.BUSERROR) , NRF_SPIM_EVENT_RXMATCH0 = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.MATCH[0]) , NRF_SPIM_EVENT_RXMATCH1 = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.MATCH[1]) , NRF_SPIM_EVENT_RXMATCH2 = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.MATCH[2]) , NRF_SPIM_EVENT_RXMATCH3 = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.MATCH[3]) , NRF_SPIM_EVENT_TXSTARTED = offsetof(NRF_SPIM_Type, EVENTS_DMA.TX.READY) , NRF_SPIM_EVENT_TXBUSERROR = offsetof(NRF_SPIM_Type, EVENTS_DMA.TX.BUSERROR) , NRF_SPIM_EVENT_ENDRX = offsetof(NRF_SPIM_Type, EVENTS_DMA.RX.END) , NRF_SPIM_EVENT_ENDTX = offsetof(NRF_SPIM_Type, EVENTS_DMA.TX.END) , NRF_SPIM_EVENT_END = offsetof(NRF_SPIM_Type, EVENTS_END) } |
SPIM events. More... | |
enum | nrf_spim_short_mask_t { NRF_SPIM_SHORT_END_START_MASK = SPIM_SHORTS_END_START_Msk , NRF_SPIM_SHORT_RXMATCH0_ENABLERXMATCH1_MASK = SPIM_SHORTS_DMA_RX_MATCH0_DMA_RX_ENABLEMATCH1_Msk , NRF_SPIM_SHORT_RXMATCH1_ENABLERXMATCH2_MASK = SPIM_SHORTS_DMA_RX_MATCH1_DMA_RX_ENABLEMATCH2_Msk , NRF_SPIM_SHORT_RXMATCH2_ENABLERXMATCH3_MASK = SPIM_SHORTS_DMA_RX_MATCH2_DMA_RX_ENABLEMATCH3_Msk , NRF_SPIM_SHORT_RXMATCH3_ENABLERXMATCH0_MASK = SPIM_SHORTS_DMA_RX_MATCH3_DMA_RX_ENABLEMATCH0_Msk , NRF_SPIM_SHORT_RXMATCH0_DISABLERXMATCH0_MASK = SPIM_SHORTS_DMA_RX_MATCH0_DMA_RX_DISABLEMATCH0_Msk , NRF_SPIM_SHORT_RXMATCH1_DISABLERXMATCH1_MASK = SPIM_SHORTS_DMA_RX_MATCH1_DMA_RX_DISABLEMATCH1_Msk , NRF_SPIM_SHORT_RXMATCH2_DISABLERXMATCH2_MASK = SPIM_SHORTS_DMA_RX_MATCH2_DMA_RX_DISABLEMATCH2_Msk , NRF_SPIM_SHORT_RXMATCH3_DISABLERXMATCH3_MASK = SPIM_SHORTS_DMA_RX_MATCH3_DMA_RX_DISABLEMATCH3_Msk , NRF_SPIM_ALL_SHORTS_MASK } |
SPIM shortcuts. More... | |
enum | nrf_spim_int_mask_t { NRF_SPIM_INT_STARTED_MASK = SPIM_INTENSET_STARTED_Msk , NRF_SPIM_INT_STOPPED_MASK = SPIM_INTENSET_STOPPED_Msk , NRF_SPIM_INT_RXREADY_MASK = SPIM_INTENSET_DMARXREADY_Msk , NRF_SPIM_INT_RXBUSERROR_MASK = SPIM_INTENSET_DMARXBUSERROR_Msk , NRF_SPIM_INT_RXMATCH0_MASK = SPIM_INTENSET_DMARXMATCH0_Msk , NRF_SPIM_INT_RXMATCH1_MASK = SPIM_INTENSET_DMARXMATCH1_Msk , NRF_SPIM_INT_RXMATCH2_MASK = SPIM_INTENSET_DMARXMATCH2_Msk , NRF_SPIM_INT_RXMATCH3_MASK = SPIM_INTENSET_DMARXMATCH3_Msk , NRF_SPIM_INT_TXREADY_MASK = SPIM_INTENSET_DMATXREADY_Msk , NRF_SPIM_INT_TXBUSERROR_MASK = SPIM_INTENSET_DMATXBUSERROR_Msk , NRF_SPIM_INT_ENDRX_MASK = SPIM_INTENSET_DMARXEND_Msk , NRF_SPIM_INT_ENDTX_MASK = SPIM_INTENSET_DMATXEND_Msk , NRF_SPIM_INT_END_MASK = SPIM_INTENSET_END_Msk , NRF_SPIM_ALL_INTS_MASK } |
SPIM interrupts. More... | |
enum | nrf_spim_frequency_t { NRF_SPIM_FREQ_125K = SPIM_FREQUENCY_FREQUENCY_K125 , NRF_SPIM_FREQ_250K = SPIM_FREQUENCY_FREQUENCY_K250 , NRF_SPIM_FREQ_500K = SPIM_FREQUENCY_FREQUENCY_K500 , NRF_SPIM_FREQ_1M = SPIM_FREQUENCY_FREQUENCY_M1 , NRF_SPIM_FREQ_2M = SPIM_FREQUENCY_FREQUENCY_M2 , NRF_SPIM_FREQ_4M = SPIM_FREQUENCY_FREQUENCY_M4 , NRF_SPIM_FREQ_8M = (int)SPIM_FREQUENCY_FREQUENCY_M8 , NRF_SPIM_FREQ_16M = SPIM_FREQUENCY_FREQUENCY_M16 , NRF_SPIM_FREQ_32M = SPIM_FREQUENCY_FREQUENCY_M32 } |
SPI master data rates. More... | |
enum | nrf_spim_mode_t { NRF_SPIM_MODE_0 , NRF_SPIM_MODE_1 , NRF_SPIM_MODE_2 , NRF_SPIM_MODE_3 } |
SPI modes. More... | |
enum | nrf_spim_bit_order_t { NRF_SPIM_BIT_ORDER_MSB_FIRST = SPIM_CONFIG_ORDER_MsbFirst , NRF_SPIM_BIT_ORDER_LSB_FIRST = SPIM_CONFIG_ORDER_LsbFirst } |
SPI bit orders. More... | |
enum | nrf_spim_csn_pol_t { NRF_SPIM_CSN_POL_LOW = SPIM_CSNPOL_CSNPOL_LOW , NRF_SPIM_CSN_POL_HIGH = SPIM_CSNPOL_CSNPOL_HIGH } |
SPI CSN pin polarity. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_spim_task_trigger (NRF_SPIM_Type *p_reg, nrf_spim_task_t task) |
Function for activating the specified SPIM task. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_task_address_get (NRF_SPIM_Type const *p_reg, nrf_spim_task_t task) |
Function for getting the address of the specified SPIM task register. | |
NRF_STATIC_INLINE void | nrf_spim_event_clear (NRF_SPIM_Type *p_reg, nrf_spim_event_t event) |
Function for clearing the specified SPIM event. | |
NRF_STATIC_INLINE bool | nrf_spim_event_check (NRF_SPIM_Type const *p_reg, nrf_spim_event_t event) |
Function for retrieving the state of the SPIM event. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_event_address_get (NRF_SPIM_Type const *p_reg, nrf_spim_event_t event) |
Function for getting the address of the specified SPIM event register. | |
NRF_STATIC_INLINE void | nrf_spim_shorts_enable (NRF_SPIM_Type *p_reg, uint32_t mask) |
Function for enabling the specified shortcuts. | |
NRF_STATIC_INLINE void | nrf_spim_shorts_disable (NRF_SPIM_Type *p_reg, uint32_t mask) |
Function for disabling the specified shortcuts. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_shorts_get (NRF_SPIM_Type const *p_reg) |
Function for getting the shortcut setting. | |
NRF_STATIC_INLINE void | nrf_spim_int_enable (NRF_SPIM_Type *p_reg, uint32_t mask) |
Function for enabling the specified interrupts. | |
NRF_STATIC_INLINE void | nrf_spim_int_disable (NRF_SPIM_Type *p_reg, uint32_t mask) |
Function for disabling the specified interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_int_enable_check (NRF_SPIM_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE void | nrf_spim_prescaler_set (NRF_SPIM_Type *p_reg, uint32_t prescaler) |
Function for setting the prescaler value. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_prescaler_get (NRF_SPIM_Type const *p_reg) |
Function for getting the prescaler value. | |
NRF_STATIC_INLINE void | nrf_spim_subscribe_set (NRF_SPIM_Type *p_reg, nrf_spim_task_t task, uint8_t channel) |
Function for setting the subscribe configuration for a given SPIM task. | |
NRF_STATIC_INLINE void | nrf_spim_subscribe_clear (NRF_SPIM_Type *p_reg, nrf_spim_task_t task) |
Function for clearing the subscribe configuration for a given SPIM task. | |
NRF_STATIC_INLINE void | nrf_spim_publish_set (NRF_SPIM_Type *p_reg, nrf_spim_event_t event, uint8_t channel) |
Function for setting the publish configuration for a given SPIM event. | |
NRF_STATIC_INLINE void | nrf_spim_publish_clear (NRF_SPIM_Type *p_reg, nrf_spim_event_t event) |
Function for clearing the publish configuration for a given SPIM event. | |
NRF_STATIC_INLINE void | nrf_spim_enable (NRF_SPIM_Type *p_reg) |
Function for enabling the SPIM peripheral. | |
NRF_STATIC_INLINE void | nrf_spim_disable (NRF_SPIM_Type *p_reg) |
Function for disabling the SPIM peripheral. | |
NRF_STATIC_INLINE bool | nrf_spim_enable_check (NRF_SPIM_Type const *p_reg) |
Function for checking if the SPIM peripheral is enabled. | |
NRF_STATIC_INLINE void | nrf_spim_pins_set (NRF_SPIM_Type *p_reg, uint32_t sck_pin, uint32_t mosi_pin, uint32_t miso_pin) |
Function for configuring SPIM pins. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_sck_pin_get (NRF_SPIM_Type const *p_reg) |
Function for getting the SCK pin selection. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_mosi_pin_get (NRF_SPIM_Type const *p_reg) |
Function for getting the MOSI pin selection. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_miso_pin_get (NRF_SPIM_Type const *p_reg) |
Function for getting the MISO pin selection. | |
NRF_STATIC_INLINE void | nrf_spim_csn_configure (NRF_SPIM_Type *p_reg, uint32_t pin, nrf_spim_csn_pol_t polarity, uint32_t duration) |
Function for configuring the SPIM hardware CSN pin. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_csn_pin_get (NRF_SPIM_Type const *p_reg) |
Function for getting the CSN pin selection. | |
NRF_STATIC_INLINE void | nrf_spim_dcx_pin_set (NRF_SPIM_Type *p_reg, uint32_t dcx_pin) |
Function for configuring the SPIM DCX pin. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_dcx_pin_get (NRF_SPIM_Type const *p_reg) |
Function for getting the DCX pin selection. | |
NRF_STATIC_INLINE void | nrf_spim_dcx_cnt_set (NRF_SPIM_Type *p_reg, uint32_t count) |
Function for configuring the number of command bytes. | |
NRF_STATIC_INLINE void | nrf_spim_iftiming_set (NRF_SPIM_Type *p_reg, uint32_t rxdelay) |
Function for configuring the extended SPIM interface. | |
NRF_STATIC_INLINE void | nrf_spim_stallstat_rx_clear (NRF_SPIM_Type *p_reg) |
Function for clearing stall status for RX EasyDMA RAM accesses. | |
NRF_STATIC_INLINE bool | nrf_spim_stallstat_rx_get (NRF_SPIM_Type const *p_reg) |
Function for getting stall status for RX EasyDMA RAM accesses. | |
NRF_STATIC_INLINE void | nrf_spim_stallstat_tx_clear (NRF_SPIM_Type *p_reg) |
Function for clearing stall status for TX EasyDMA RAM accesses. | |
NRF_STATIC_INLINE bool | nrf_spim_stallstat_tx_get (NRF_SPIM_Type const *p_reg) |
Function for getting stall status for TX EasyDMA RAM accesses. | |
NRF_STATIC_INLINE void | nrf_spim_frequency_set (NRF_SPIM_Type *p_reg, nrf_spim_frequency_t frequency) |
Function for setting the SPI master data rate. | |
NRF_STATIC_INLINE nrf_spim_frequency_t | nrf_spim_frequency_get (NRF_SPIM_Type *p_reg) |
Function for getting the SPI master data rate. | |
NRF_STATIC_INLINE void | nrf_spim_tx_buffer_set (NRF_SPIM_Type *p_reg, uint8_t const *p_buffer, size_t length) |
Function for setting the transmit buffer. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_tx_amount_get (NRF_SPIM_Type const *p_reg) |
Function for getting number of bytes transmitted in the last transaction. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_tx_maxcnt_get (NRF_SPIM_Type const *p_reg) |
Function for getting number of bytes to be transmitted in the next transaction. | |
NRF_STATIC_INLINE void | nrf_spim_rx_buffer_set (NRF_SPIM_Type *p_reg, uint8_t *p_buffer, size_t length) |
Function for setting the receive buffer. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_rx_amount_get (NRF_SPIM_Type const *p_reg) |
Function for getting number of bytes received in the last transaction. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_rx_maxcnt_get (NRF_SPIM_Type const *p_reg) |
Function for getting number of bytes to be received in the next transaction. | |
NRF_STATIC_INLINE void | nrf_spim_configure (NRF_SPIM_Type *p_reg, nrf_spim_mode_t spi_mode, nrf_spim_bit_order_t spi_bit_order) |
Function for setting the SPI configuration. | |
NRF_STATIC_INLINE void | nrf_spim_orc_set (NRF_SPIM_Type *p_reg, uint8_t orc) |
Function for setting the over-read character. | |
NRF_STATIC_INLINE void | nrf_spim_tx_list_enable (NRF_SPIM_Type *p_reg) |
Function for enabling the TX list feature. | |
NRF_STATIC_INLINE void | nrf_spim_tx_list_disable (NRF_SPIM_Type *p_reg) |
Function for disabling the TX list feature. | |
NRF_STATIC_INLINE void | nrf_spim_rx_list_enable (NRF_SPIM_Type *p_reg) |
Function for enabling the RX list feature. | |
NRF_STATIC_INLINE void | nrf_spim_rx_list_disable (NRF_SPIM_Type *p_reg) |
Function for disabling the RX list feature. | |
NRF_STATIC_INLINE void | nrf_spim_rx_pattern_match_enable_set (NRF_SPIM_Type *p_reg, uint8_t index, bool enable) |
Function for enabling individual pattern match filters. | |
NRF_STATIC_INLINE bool | nrf_spim_rx_pattern_match_enable_check (NRF_SPIM_Type const *p_reg, uint8_t index) |
Function for checking if the specified pattern match filter is enabled. | |
NRF_STATIC_INLINE void | nrf_spim_rx_pattern_match_one_shot_enable (NRF_SPIM_Type *p_reg, uint8_t index) |
Function for enabling one-shot operation for the specified match filter. | |
NRF_STATIC_INLINE void | nrf_spim_rx_pattern_match_one_shot_disable (NRF_SPIM_Type *p_reg, uint8_t index) |
Function for disabling one-shot operation for the specified match filter. | |
NRF_STATIC_INLINE bool | nrf_spim_rx_pattern_match_one_shot_check (NRF_SPIM_Type const *p_reg, uint8_t index) |
Function for checking if specified pattern match filter is configured as one-shot. | |
NRF_STATIC_INLINE void | nrf_spim_rx_pattern_match_candidate_set (NRF_SPIM_Type *p_reg, uint8_t index, uint32_t pattern) |
Function for setting the pattern to be looked for by the specified match filter. | |
NRF_STATIC_INLINE uint32_t | nrf_spim_rx_pattern_match_candidate_get (NRF_SPIM_Type const *p_reg, uint8_t index) |
Function for getting the pattern that the specified match filter is looking for. | |
NRF_STATIC_INLINE void | nrf_spim_rx_terminate_on_bus_error_enable (NRF_SPIM_Type *p_reg) |
Function for enabling the termination of the RX transaction after detecting the BUSERROR event. | |
NRF_STATIC_INLINE void | nrf_spim_rx_terminate_on_bus_error_disable (NRF_SPIM_Type *p_reg) |
Function for disabling the termination of the RX transaction after detecting the BUSERROR event. | |
NRF_STATIC_INLINE bool | nrf_spim_rx_terminate_on_bus_error_check (NRF_SPIM_Type const *p_reg) |
Function for checking if RX transaction termination after detecting the BUSERROR event is enabled. | |
NRF_STATIC_INLINE void | nrf_spim_tx_terminate_on_bus_error_enable (NRF_SPIM_Type *p_reg) |
Function for enabling the termination of the TX transaction after detecting the BUSERROR event. | |
NRF_STATIC_INLINE void | nrf_spim_tx_terminate_on_bus_error_disable (NRF_SPIM_Type *p_reg) |
Function for disabling the termination of the TX transaction after detecting the BUSERROR event. | |
NRF_STATIC_INLINE bool | nrf_spim_tx_terminate_on_bus_error_check (NRF_SPIM_Type const *p_reg) |
Function for checking if TX transaction termination after detecting the BUSERROR event is enabled. | |
Hardware access layer for managing the SPIM peripheral.
#define NRF_SPIM_BASE_FREQUENCY_GET | ( | p_reg | ) |
Macro for getting base frequency value in Hz for the specified SPIM instance.
#define NRF_SPIM_FREQUENCY_STATIC_CHECK | ( | p_reg, | |
frequency | |||
) |
Macro for checking whether specified frequency can be achieved for a given SPIM instance.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | frequency | Desired frequency value in Hz. |
#define NRF_SPIM_INST_GET | ( | idx | ) | NRFX_CONCAT(NRF_, SPIM, idx) |
Macro getting pointer to the structure of registers of the SPIM peripheral.
[in] | idx | SPIM instance index. |
#define NRF_SPIM_IS_128MHZ_SPIM | ( | p_reg | ) |
Macro for checking whether the base frequency for the specified SPIM instance is 128 MHz.
#define NRF_SPIM_IS_320MHZ_SPIM | ( | p_reg | ) |
Macro for checking whether the base frequency for the specified SPIM instance is 320 MHz.
#define NRF_SPIM_IS_64MHZ_SPIM | ( | p_reg | ) |
Macro for checking whether the base frequency for the specified SPIM instance is 64 MHz.
#define NRF_SPIM_PRESCALER_CALCULATE | ( | p_reg, | |
frequency | |||
) | ((uint32_t)(NRF_SPIM_BASE_FREQUENCY_GET(p_reg)) / (uint32_t)(frequency)) |
Macro for computing prescaler value for a given SPIM instance and desired frequency.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | frequency | Desired frequency value in Hz. |
#define NRF_SPIM_PRESCALER_MAX_GET | ( | p_reg | ) |
Macro for getting the maximum value of PRESCALER register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
#define NRF_SPIM_PRESCALER_MIN_GET | ( | p_reg | ) |
Macro for getting the minimum value of PRESCALER register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
enum nrf_spim_bit_order_t |
enum nrf_spim_csn_pol_t |
enum nrf_spim_event_t |
SPIM events.
enum nrf_spim_frequency_t |
enum nrf_spim_int_mask_t |
SPIM interrupts.
enum nrf_spim_mode_t |
SPIM shortcuts.
enum nrf_spim_task_t |
SPIM tasks.
NRF_STATIC_INLINE void nrf_spim_configure | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_mode_t | spi_mode, | ||
nrf_spim_bit_order_t | spi_bit_order | ||
) |
Function for setting the SPI configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | spi_mode | SPI mode. |
[in] | spi_bit_order | SPI bit order. |
NRF_STATIC_INLINE void nrf_spim_csn_configure | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | pin, | ||
nrf_spim_csn_pol_t | polarity, | ||
uint32_t | duration | ||
) |
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.
[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 and minimum duration of CSN must stay unselected between transactions. The value is specified in number of 64 MHz clock cycles (15.625 ns). |
NRF_STATIC_INLINE uint32_t nrf_spim_csn_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the CSN pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_dcx_cnt_set | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | count | ||
) |
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.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | count | Number of command bytes preceding the data bytes. |
NRF_STATIC_INLINE uint32_t nrf_spim_dcx_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the DCX pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_dcx_pin_set | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | dcx_pin | ||
) |
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.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | dcx_pin | DCX pin number. |
NRF_STATIC_INLINE void nrf_spim_disable | ( | NRF_SPIM_Type * | p_reg | ) |
Function for disabling the SPIM peripheral.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_enable | ( | NRF_SPIM_Type * | p_reg | ) |
Function for enabling the SPIM peripheral.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE bool nrf_spim_enable_check | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for checking if the SPIM peripheral is enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | The SPIM is enabled. |
false | The SPIM is not enabled. |
NRF_STATIC_INLINE uint32_t nrf_spim_event_address_get | ( | NRF_SPIM_Type const * | p_reg, |
nrf_spim_event_t | event | ||
) |
Function for getting the address of the specified SPIM event register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | The specified event. |
NRF_STATIC_INLINE bool nrf_spim_event_check | ( | NRF_SPIM_Type const * | p_reg, |
nrf_spim_event_t | event | ||
) |
Function for retrieving the state of the SPIM 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_spim_event_clear | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_event_t | event | ||
) |
Function for clearing the specified SPIM event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be cleared. |
NRF_STATIC_INLINE nrf_spim_frequency_t nrf_spim_frequency_get | ( | NRF_SPIM_Type * | p_reg | ) |
Function for getting the SPI master data rate.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
SPI | master frequency. |
NRF_STATIC_INLINE void nrf_spim_frequency_set | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_frequency_t | frequency | ||
) |
Function for setting the SPI master data rate.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | frequency | SPI frequency. |
NRF_STATIC_INLINE void nrf_spim_iftiming_set | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | rxdelay | ||
) |
Function for configuring the extended SPIM interface.
[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. |
NRF_STATIC_INLINE void nrf_spim_int_disable | ( | NRF_SPIM_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_spim_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_spim_int_enable | ( | NRF_SPIM_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_spim_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_spim_int_enable_check | ( | NRF_SPIM_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_spim_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_spim_miso_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the MISO pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_spim_mosi_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the MOSI pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_orc_set | ( | NRF_SPIM_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 that is clocked out in case of an over-read of the TXD buffer. |
NRF_STATIC_INLINE void nrf_spim_pins_set | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | sck_pin, | ||
uint32_t | mosi_pin, | ||
uint32_t | miso_pin | ||
) |
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.
[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. |
NRF_STATIC_INLINE uint32_t nrf_spim_prescaler_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the prescaler value.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_prescaler_set | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | prescaler | ||
) |
Function for setting the prescaler value.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | prescaler | Prescaler value. |
NRF_STATIC_INLINE void nrf_spim_publish_clear | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_event_t | event | ||
) |
Function for clearing the publish configuration for a given SPIM 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_spim_publish_set | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the publish configuration for a given SPIM 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 uint32_t nrf_spim_rx_amount_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting number of bytes received in the last transaction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
Amount | of bytes received. |
NRF_STATIC_INLINE void nrf_spim_rx_buffer_set | ( | NRF_SPIM_Type * | p_reg, |
uint8_t * | p_buffer, | ||
size_t | length | ||
) |
Function for setting the receive buffer.
[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. |
NRF_STATIC_INLINE void nrf_spim_rx_list_disable | ( | NRF_SPIM_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_spim_rx_list_enable | ( | NRF_SPIM_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 uint32_t nrf_spim_rx_maxcnt_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting number of bytes to be received in the next transaction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
Amount | of bytes to be received. |
NRF_STATIC_INLINE uint32_t nrf_spim_rx_pattern_match_candidate_get | ( | NRF_SPIM_Type const * | p_reg, |
uint8_t | index | ||
) |
Function for getting the pattern that the specified match filter is looking for.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_candidate_set | ( | NRF_SPIM_Type * | p_reg, |
uint8_t | index, | ||
uint32_t | pattern | ||
) |
Function for setting the pattern to be looked for by the specified match filter.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
[in] | pattern | Pattern to be looked for. Match will trigger the corresponding event, if enabled. |
NRF_STATIC_INLINE bool nrf_spim_rx_pattern_match_enable_check | ( | NRF_SPIM_Type const * | p_reg, |
uint8_t | index | ||
) |
Function for checking if the specified pattern match filter is enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
true | Pattern match filter is enabled. |
false | Pattern match filter is disabled. |
NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_enable_set | ( | NRF_SPIM_Type * | p_reg, |
uint8_t | index, | ||
bool | enable | ||
) |
Function for enabling individual pattern match filters.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
[in] | enable | True if pattern match filter is to be enabled, false otherwise. |
NRF_STATIC_INLINE bool nrf_spim_rx_pattern_match_one_shot_check | ( | NRF_SPIM_Type const * | p_reg, |
uint8_t | index | ||
) |
Function for checking if specified pattern match filter is configured as one-shot.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
true | Pattern match filter is configured as one-shot. |
false | Pattern match filter is configured as continuous. |
NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_one_shot_disable | ( | NRF_SPIM_Type * | p_reg, |
uint8_t | index | ||
) |
Function for disabling one-shot operation for the specified match filter.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_one_shot_enable | ( | NRF_SPIM_Type * | p_reg, |
uint8_t | index | ||
) |
Function for enabling one-shot operation for the specified match filter.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | index | Index of pattern match filter. |
NRF_STATIC_INLINE bool nrf_spim_rx_terminate_on_bus_error_check | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for checking if RX transaction termination after detecting the BUSERROR event is enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | RX transaction termination after detecting a BUSERROR event is enabled. |
false | RX transaction termination after detecting a BUSERROR event is disabled. |
NRF_STATIC_INLINE void nrf_spim_rx_terminate_on_bus_error_disable | ( | NRF_SPIM_Type * | p_reg | ) |
Function for disabling the termination of the RX transaction after detecting the BUSERROR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_rx_terminate_on_bus_error_enable | ( | NRF_SPIM_Type * | p_reg | ) |
Function for enabling the termination of the RX transaction after detecting the BUSERROR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_spim_sck_pin_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the SCK pin selection.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_shorts_disable | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling the specified shortcuts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Shortcuts to be disabled. |
NRF_STATIC_INLINE void nrf_spim_shorts_enable | ( | NRF_SPIM_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling the specified shortcuts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Shortcuts to be enabled. |
NRF_STATIC_INLINE uint32_t nrf_spim_shorts_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting the shortcut setting.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_stallstat_rx_clear | ( | NRF_SPIM_Type * | p_reg | ) |
Function for clearing stall status for RX EasyDMA RAM accesses.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE bool nrf_spim_stallstat_rx_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting stall status for RX EasyDMA RAM accesses.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_stallstat_tx_clear | ( | NRF_SPIM_Type * | p_reg | ) |
Function for clearing stall status for TX EasyDMA RAM accesses.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE bool nrf_spim_stallstat_tx_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting stall status for TX EasyDMA RAM accesses.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_subscribe_clear | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_task_t | task | ||
) |
Function for clearing the subscribe configuration for a given SPIM 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_spim_subscribe_set | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the subscribe configuration for a given SPIM 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_spim_task_address_get | ( | NRF_SPIM_Type const * | p_reg, |
nrf_spim_task_t | task | ||
) |
Function for getting the address of the specified SPIM task register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | The specified task. |
NRF_STATIC_INLINE void nrf_spim_task_trigger | ( | NRF_SPIM_Type * | p_reg, |
nrf_spim_task_t | task | ||
) |
Function for activating the specified SPIM task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be activated. |
NRF_STATIC_INLINE uint32_t nrf_spim_tx_amount_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting number of bytes transmitted in the last transaction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
Amount | of bytes transmitted. |
NRF_STATIC_INLINE void nrf_spim_tx_buffer_set | ( | NRF_SPIM_Type * | p_reg, |
uint8_t const * | p_buffer, | ||
size_t | length | ||
) |
Function for setting the transmit buffer.
[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. |
NRF_STATIC_INLINE void nrf_spim_tx_list_disable | ( | NRF_SPIM_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_spim_tx_list_enable | ( | NRF_SPIM_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 uint32_t nrf_spim_tx_maxcnt_get | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for getting number of bytes to be transmitted in the next transaction.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
Amount | of bytes to be transmitted. |
NRF_STATIC_INLINE bool nrf_spim_tx_terminate_on_bus_error_check | ( | NRF_SPIM_Type const * | p_reg | ) |
Function for checking if TX transaction termination after detecting the BUSERROR event is enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | TX transaction termination after detecting a BUSERROR event is enabled. |
false | TX transaction termination after detecting a BUSERROR event is disabled. |
NRF_STATIC_INLINE void nrf_spim_tx_terminate_on_bus_error_disable | ( | NRF_SPIM_Type * | p_reg | ) |
Function for disabling the termination of the TX transaction after detecting the BUSERROR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_spim_tx_terminate_on_bus_error_enable | ( | NRF_SPIM_Type * | p_reg | ) |
Function for enabling the termination of the TX transaction after detecting the BUSERROR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |