![]() |
nrfx 4.5.0
|
Hardware access layer for managing the Time Division Multiplexed Audio Interface (TDM) peripheral. More...
Data Structures | |
| struct | nrf_tdm_config_t |
| TDM configuration. More... | |
| struct | nrf_tdm_pins_t |
| TDM pins. More... | |
Macros | |
| #define | NRF_TDM_INST_GET(idx) |
| Macro for getting a pointer to the structure of registers of the TDM peripheral. | |
| #define | NRF_TDM_PIN_NOT_CONNECTED UINT32_MAX |
| This value can be provided as a parameter for the nrf_tdm_pins_set function call to specify that the given TDM signal (SDOUT, SDIN, or MCK) shall not be connected to a physical pin. | |
| #define | NRF_TDM_PSEL_SCK_PIN_MASK TDM_PSEL_SCK_PIN_Msk |
| TDM SCK pin selection mask. | |
| #define | NRF_TDM_PSEL_SCK_PORT_MASK TDM_PSEL_SCK_PORT_Msk |
| TDM SCK port selection mask. | |
| #define | NRF_TDM_CK_DIV_MIN TDM_CONFIG_MCK_DIV_DIV_Min |
| Minimum value of TDM clock divisor. | |
| #define | NRF_TDM_CK_DIV_MAX TDM_CONFIG_MCK_DIV_DIV_Max |
| Maximum value of TDM clock divisor. | |
Enumerations | |
| enum | nrf_tdm_task_t { NRF_TDM_TASK_START = offsetof(NRF_TDM_Type, TASKS_START) , NRF_TDM_TASK_STOP = offsetof(NRF_TDM_Type, TASKS_STOP) , NRF_TDM_TASK_ABORT = offsetof(NRF_TDM_Type, TASKS_ABORT) } |
| TDM tasks. More... | |
| enum | nrf_tdm_event_t { NRF_TDM_EVENT_RXPTRUPD = offsetof(NRF_TDM_Type, EVENTS_RXPTRUPD) , NRF_TDM_EVENT_STOPPED = offsetof(NRF_TDM_Type, EVENTS_STOPPED) , NRF_TDM_EVENT_ABORTED = offsetof(NRF_TDM_Type, EVENTS_ABORTED) , NRF_TDM_EVENT_TXPTRUPD = offsetof(NRF_TDM_Type, EVENTS_TXPTRUPD) , NRF_TDM_EVENT_MAXCNT = offsetof(NRF_TDM_Type, EVENTS_MAXCNT) } |
| TDM events. More... | |
| enum | nrf_tdm_int_mask_t { NRF_TDM_INT_RXPTRUPD_MASK_MASK = TDM_INTENSET_RXPTRUPD_Msk , NRF_TDM_INT_STOPPED_MASK_MASK = TDM_INTENSET_STOPPED_Msk , NRF_TDM_INT_ABORTED_MASK = TDM_INTENSET_ABORTED_Msk , NRF_TDM_INT_TXPTRUPD_MASK_MASK = TDM_INTENSET_TXPTRUPD_Msk , NRF_TDM_INT_MAXCNT_MASK = TDM_INTENSET_MAXCNT_Msk } |
| TDM interrupts. More... | |
| enum | nrf_tdm_mode_t { NRF_TDM_MODE_MASTER = TDM_CONFIG_MODE_MODE_Master , NRF_TDM_MODE_SLAVE = TDM_CONFIG_MODE_MODE_Slave } |
| TDM modes of operation. More... | |
| enum | nrf_tdm_rxtxen_t { NRF_TDM_RXTXEN_DUPLEX = TDM_CONFIG_RXTXEN_RXTXEN_Duplex , NRF_TDM_RXTXEN_RX = TDM_CONFIG_RXTXEN_RXTXEN_Rx , NRF_TDM_RXTXEN_TX = TDM_CONFIG_RXTXEN_RXTXEN_Tx } |
| TDM Reception and transmission settings. More... | |
| enum | nrf_tdm_mck_div_t { NRF_TDM_MCK_DIV_2 = TDM_CONFIG_MCK_DIV_DIV_CKDIV2 , NRF_TDM_MCK_DIV_3 = TDM_CONFIG_MCK_DIV_DIV_CKDIV3 , NRF_TDM_MCK_DIV_4 = TDM_CONFIG_MCK_DIV_DIV_CKDIV4 , NRF_TDM_MCK_DIV_5 = TDM_CONFIG_MCK_DIV_DIV_CKDIV5 , NRF_TDM_MCK_DIV_6 = TDM_CONFIG_MCK_DIV_DIV_CKDIV6 , NRF_TDM_MCK_DIV_8 = TDM_CONFIG_MCK_DIV_DIV_CKDIV8 , NRF_TDM_MCK_DIV_10 = TDM_CONFIG_MCK_DIV_DIV_CKDIV10 , NRF_TDM_MCK_DIV_11 = TDM_CONFIG_MCK_DIV_DIV_CKDIV11 , NRF_TDM_MCK_DIV_15 = TDM_CONFIG_MCK_DIV_DIV_CKDIV15 , NRF_TDM_MCK_DIV_16 = TDM_CONFIG_MCK_DIV_DIV_CKDIV16 , NRF_TDM_MCK_DIV_21 = TDM_CONFIG_MCK_DIV_DIV_CKDIV21 , NRF_TDM_MCK_DIV_23 = TDM_CONFIG_MCK_DIV_DIV_CKDIV23 , NRF_TDM_MCK_DIV_30 = TDM_CONFIG_MCK_DIV_DIV_CKDIV30 , NRF_TDM_MCK_DIV_31 = TDM_CONFIG_MCK_DIV_DIV_CKDIV31 , NRF_TDM_MCK_DIV_32 = TDM_CONFIG_MCK_DIV_DIV_CKDIV32 , NRF_TDM_MCK_DIV_42 = TDM_CONFIG_MCK_DIV_DIV_CKDIV42 , NRF_TDM_MCK_DIV_63 = TDM_CONFIG_MCK_DIV_DIV_CKDIV63 , NRF_TDM_MCK_DIV_125 = TDM_CONFIG_MCK_DIV_DIV_CKDIV125 } |
| TDM master clock divider settings. More... | |
| enum | nrf_tdm_sck_div_t { NRF_TDM_SCK_DIV_2 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV2 , NRF_TDM_SCK_DIV_3 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV3 , NRF_TDM_SCK_DIV_4 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV4 , NRF_TDM_SCK_DIV_5 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV5 , NRF_TDM_SCK_DIV_6 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV6 , NRF_TDM_SCK_DIV_8 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV8 , NRF_TDM_SCK_DIV_10 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV10 , NRF_TDM_SCK_DIV_11 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV11 , NRF_TDM_SCK_DIV_15 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV15 , NRF_TDM_SCK_DIV_16 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV16 , NRF_TDM_SCK_DIV_21 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV21 , NRF_TDM_SCK_DIV_23 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV23 , NRF_TDM_SCK_DIV_30 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV30 , NRF_TDM_SCK_DIV_31 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV31 , NRF_TDM_SCK_DIV_32 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV32 , NRF_TDM_SCK_DIV_42 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV42 , NRF_TDM_SCK_DIV_63 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV63 , NRF_TDM_SCK_DIV_125 = TDM_CONFIG_SCK_DIV_SCKDIV_CKDIV125 } |
| TDM serial clock divider settings. More... | |
| enum | nrf_tdm_src_t { NRF_TDM_SRC_PCLK32M = TDM_CONFIG_SCK_SRC_CLKSRC_PCLK , NRF_TDM_SRC_ACLK = TDM_CONFIG_SCK_SRC_CLKSRC_ACLK } |
| TDM clock source selection. More... | |
| enum | nrf_tdm_swidth_t { NRF_TDM_SWIDTH_8BIT = TDM_CONFIG_SWIDTH_SWIDTH_8Bit , NRF_TDM_SWIDTH_16BIT = TDM_CONFIG_SWIDTH_SWIDTH_16Bit , NRF_TDM_SWIDTH_24BIT = TDM_CONFIG_SWIDTH_SWIDTH_24Bit , NRF_TDM_SWIDTH_32BIT = TDM_CONFIG_SWIDTH_SWIDTH_32Bit , NRF_TDM_SWIDTH_8BIT_IN16BIT = TDM_CONFIG_SWIDTH_SWIDTH_8BitIn16 , NRF_TDM_SWIDTH_8BIT_IN32BIT = TDM_CONFIG_SWIDTH_SWIDTH_8BitIn32 , NRF_TDM_SWIDTH_16BIT_IN32BIT = TDM_CONFIG_SWIDTH_SWIDTH_16BitIn32 , NRF_TDM_SWIDTH_24BIT_IN32BIT = TDM_CONFIG_SWIDTH_SWIDTH_24BitIn32 } |
| TDM sample widths. More... | |
| enum | nrf_tdm_align_t { NRF_TDM_ALIGN_LEFT = TDM_CONFIG_ALIGN_ALIGN_Left , NRF_TDM_ALIGN_RIGHT = TDM_CONFIG_ALIGN_ALIGN_Right } |
| TDM alignments of sample within a frame. More... | |
| enum | nrf_tdm_channel_mask_t { NRF_TDM_CHANNEL_RX0_MASK = TDM_CONFIG_CHANNEL_MASK_Rx0Enable_Msk , NRF_TDM_CHANNEL_RX1_MASK = TDM_CONFIG_CHANNEL_MASK_Rx1Enable_Msk , NRF_TDM_CHANNEL_RX2_MASK = TDM_CONFIG_CHANNEL_MASK_Rx2Enable_Msk , NRF_TDM_CHANNEL_RX3_MASK = TDM_CONFIG_CHANNEL_MASK_Rx3Enable_Msk , NRF_TDM_CHANNEL_RX4_MASK = TDM_CONFIG_CHANNEL_MASK_Rx4Enable_Msk , NRF_TDM_CHANNEL_RX5_MASK = TDM_CONFIG_CHANNEL_MASK_Rx5Enable_Msk , NRF_TDM_CHANNEL_RX6_MASK = TDM_CONFIG_CHANNEL_MASK_Rx6Enable_Msk , NRF_TDM_CHANNEL_RX7_MASK = TDM_CONFIG_CHANNEL_MASK_Rx7Enable_Msk , NRF_TDM_CHANNEL_TX0_MASK = TDM_CONFIG_CHANNEL_MASK_Tx0Enable_Msk , NRF_TDM_CHANNEL_TX1_MASK = TDM_CONFIG_CHANNEL_MASK_Tx1Enable_Msk , NRF_TDM_CHANNEL_TX2_MASK = TDM_CONFIG_CHANNEL_MASK_Tx2Enable_Msk , NRF_TDM_CHANNEL_TX3_MASK = TDM_CONFIG_CHANNEL_MASK_Tx3Enable_Msk , NRF_TDM_CHANNEL_TX4_MASK = TDM_CONFIG_CHANNEL_MASK_Tx4Enable_Msk , NRF_TDM_CHANNEL_TX5_MASK = TDM_CONFIG_CHANNEL_MASK_Tx5Enable_Msk , NRF_TDM_CHANNEL_TX6_MASK = TDM_CONFIG_CHANNEL_MASK_Tx6Enable_Msk , NRF_TDM_CHANNEL_TX7_MASK = TDM_CONFIG_CHANNEL_MASK_Tx7Enable_Msk } |
| TDM channel mask. More... | |
| enum | nrf_tdm_channels_count_t { NRF_TDM_CHANNELS_COUNT_1 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm1Ch , NRF_TDM_CHANNELS_COUNT_2 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm2Ch , NRF_TDM_CHANNELS_COUNT_3 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm3Ch , NRF_TDM_CHANNELS_COUNT_4 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm4Ch , NRF_TDM_CHANNELS_COUNT_5 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm5Ch , NRF_TDM_CHANNELS_COUNT_6 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm6Ch , NRF_TDM_CHANNELS_COUNT_7 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm7Ch , NRF_TDM_CHANNELS_COUNT_8 = TDM_CONFIG_CHANNEL_NUM_NUM_Tdm8Ch } |
| TDM number of channels. More... | |
| enum | nrf_tdm_channel_delay_t { NRF_TDM_CHANNEL_DELAY_NONE = TDM_CONFIG_CHANNEL_DELAY_DELAY_Delay0Ck , NRF_TDM_CHANNEL_DELAY_1CK = TDM_CONFIG_CHANNEL_DELAY_DELAY_Delay1Ck , NRF_TDM_CHANNEL_DELAY_2CK = TDM_CONFIG_CHANNEL_DELAY_DELAY_Delay2Ck } |
| TDM channel delay. More... | |
| enum | nrf_tdm_polarity_t { NRF_TDM_POLARITY_POSEDGE , NRF_TDM_POLARITY_NEGEDGE } |
| TDM signal polarity. More... | |
| enum | nrf_tdm_fsync_duration_t { NRF_TDM_FSYNC_DURATION_SCK = TDM_CONFIG_FSYNC_DURATION_DURATION_Sck , NRF_TDM_FSYNC_DURATION_CHANNEL = TDM_CONFIG_FSYNC_DURATION_DURATION_Channel } |
| TDM frame synchronization pulse duration. More... | |
Functions | |
| NRF_STATIC_INLINE void | nrf_tdm_task_trigger (NRF_TDM_Type *p_reg, nrf_tdm_task_t task) |
| Function for activating the specified TDM task. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_task_address_get (NRF_TDM_Type const *p_reg, nrf_tdm_task_t task) |
| Function for getting the address of the specified TDM task register. | |
| NRF_STATIC_INLINE void | nrf_tdm_event_clear (NRF_TDM_Type *p_reg, nrf_tdm_event_t event) |
| Function for clearing the specified TDM event. | |
| NRF_STATIC_INLINE bool | nrf_tdm_event_check (NRF_TDM_Type const *p_reg, nrf_tdm_event_t event) |
| Function for retrieving the state of the TDM event. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_event_address_get (NRF_TDM_Type const *p_reg, nrf_tdm_event_t event) |
| Function for getting the address of the specified TDM event register. | |
| NRF_STATIC_INLINE void | nrf_tdm_int_enable (NRF_TDM_Type *p_reg, uint32_t mask) |
| Function for enabling specified interrupts. | |
| NRF_STATIC_INLINE void | nrf_tdm_int_disable (NRF_TDM_Type *p_reg, uint32_t mask) |
| Function for disabling specified interrupts. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_int_enable_check (NRF_TDM_Type const *p_reg, uint32_t mask) |
| Function for checking if the specified interrupts are enabled. | |
| NRF_STATIC_INLINE void | nrf_tdm_enable (NRF_TDM_Type *p_reg) |
| Function for enabling the TDM peripheral. | |
| NRF_STATIC_INLINE void | nrf_tdm_disable (NRF_TDM_Type *p_reg) |
| Function for disabling the TDM peripheral. | |
| NRF_STATIC_INLINE bool | nrf_tdm_enable_check (NRF_TDM_Type *p_reg) |
| Function for checking if the TDM peripheral is enabled. | |
| NRF_STATIC_INLINE void | nrf_tdm_subscribe_set (NRF_TDM_Type *p_reg, nrf_tdm_task_t task, uint8_t channel) |
| Function for setting the subscribe configuration for a given TDM task. | |
| NRF_STATIC_INLINE void | nrf_tdm_subscribe_clear (NRF_TDM_Type *p_reg, nrf_tdm_task_t task) |
| Function for clearing the subscribe configuration for a given TDM task. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_subscribe_get (NRF_TDM_Type const *p_reg, nrf_tdm_task_t task) |
| Function for getting the subscribe configuration for a given TDM task. | |
| NRF_STATIC_INLINE void | nrf_tdm_publish_set (NRF_TDM_Type *p_reg, nrf_tdm_event_t event, uint8_t channel) |
| Function for setting the publish configuration for a given TDM event. | |
| NRF_STATIC_INLINE void | nrf_tdm_publish_clear (NRF_TDM_Type *p_reg, nrf_tdm_event_t event) |
| Function for clearing the publish configuration for a given TDM event. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_publish_get (NRF_TDM_Type const *p_reg, nrf_tdm_event_t event) |
| Function for getting the publish configuration for a given TDM event. | |
| NRF_STATIC_INLINE void | nrf_tdm_pins_set (NRF_TDM_Type *p_reg, nrf_tdm_pins_t const *p_pins) |
| Function for configuring TDM pins. | |
| NRF_STATIC_INLINE void | nrf_tdm_pins_get (NRF_TDM_Type *p_reg, nrf_tdm_pins_t *p_pins) |
| Function for getting TDM pins configuration. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_sck_pin_get (NRF_TDM_Type const *p_reg) |
| Function for getting the SCK pin selection. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_fsync_pin_get (NRF_TDM_Type const *p_reg) |
| Function for getting the FSYNC pin selection. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_mck_pin_get (NRF_TDM_Type const *p_reg) |
| Function for getting the MCK pin selection. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_sdout_pin_get (NRF_TDM_Type const *p_reg) |
| Function for getting the SDOUT pin selection. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_sdin_pin_get (NRF_TDM_Type const *p_reg) |
| Function for getting the SDIN pin selection. | |
| NRF_STATIC_INLINE void | nrf_tdm_configure (NRF_TDM_Type *p_reg, nrf_tdm_config_t const *p_config) |
| Function for setting the TDM peripheral configuration. | |
| NRF_STATIC_INLINE void | nrf_tdm_mck_set (NRF_TDM_Type *p_reg, bool enable) |
| Function for setting the master clock generator. | |
| NRF_STATIC_INLINE void | nrf_tdm_rx_count_set (NRF_TDM_Type *p_reg, uint16_t size) |
| Function for setting up the TDM RX transfer length. | |
| NRF_STATIC_INLINE void | nrf_tdm_tx_count_set (NRF_TDM_Type *p_reg, uint16_t size) |
| Function for setting up the TDM TX transfer length. | |
| NRF_STATIC_INLINE void | nrf_tdm_transfer_direction_set (NRF_TDM_Type *p_reg, nrf_tdm_rxtxen_t dir) |
| Function for setting up the direction of the TDM transfer. | |
| NRF_STATIC_INLINE void | nrf_tdm_rx_buffer_set (NRF_TDM_Type *p_reg, uint32_t *p_buffer) |
| Function for setting the pointer to the receive buffer. | |
| NRF_STATIC_INLINE uint32_t * | nrf_tdm_rx_buffer_get (NRF_TDM_Type const *p_reg) |
| Function for getting the pointer to the receive buffer. | |
| NRF_STATIC_INLINE void | nrf_tdm_tx_buffer_set (NRF_TDM_Type *p_reg, uint32_t const *p_buffer) |
| Function for setting the pointer to the transmit buffer. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_current_tx_transfer_amount_get (NRF_TDM_Type const *p_reg) |
| Function for getting the number of bytes transferred in the current transaction. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_last_tx_transfer_amount_get (NRF_TDM_Type const *p_reg) |
| Function for getting the number of bytes transferred in the last transaction. The value has been updated after the END event. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_current_rx_transfer_amount_get (NRF_TDM_Type const *p_reg) |
| Function for getting the number of bytes received in the current transaction. | |
| NRF_STATIC_INLINE uint32_t | nrf_tdm_last_rx_transfer_amount_get (NRF_TDM_Type const *p_reg) |
| Function for getting the number of bytes received in the last transaction. The value has been updated after the END event. | |
| NRF_STATIC_INLINE uint32_t * | nrf_tdm_tx_buffer_get (NRF_TDM_Type const *p_reg) |
| Function for getting the pointer to the transmit buffer. | |
| NRF_STATIC_INLINE void | nrf_tdm_mck_configure (NRF_TDM_Type *p_reg, nrf_tdm_src_t clksrc, bool enable_bypass) |
| Function for configuring TDM master Clock. | |
| NRF_STATIC_INLINE void | nrf_tdm_sck_configure (NRF_TDM_Type *p_reg, nrf_tdm_src_t clksrc, bool enable_bypass) |
| Function for configuring TDM serial Clock. | |
| NRF_STATIC_INLINE void | nrf_tdm_ors_set (NRF_TDM_Type *p_reg, uint32_t ors) |
| Function for setting over-read sample. | |
Hardware access layer for managing the Time Division Multiplexed Audio Interface (TDM) peripheral.
| #define NRF_TDM_INST_GET | ( | idx | ) |
Macro for getting a pointer to the structure of registers of the TDM peripheral.
| [in] | idx | TDM instance index. |
| enum nrf_tdm_align_t |
TDM channel mask.
TDM number of channels.
| enum nrf_tdm_event_t |
TDM events.
| enum nrf_tdm_int_mask_t |
TDM interrupts.
| enum nrf_tdm_mck_div_t |
TDM master clock divider settings.
| enum nrf_tdm_mode_t |
| enum nrf_tdm_polarity_t |
| enum nrf_tdm_rxtxen_t |
| enum nrf_tdm_sck_div_t |
TDM serial clock divider settings.
| enum nrf_tdm_src_t |
| enum nrf_tdm_swidth_t |
TDM sample widths.
| enum nrf_tdm_task_t |
| NRF_STATIC_INLINE void nrf_tdm_configure | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_config_t const * | p_config ) |
Function for setting the TDM peripheral configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Pointer to the structure with configuration. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_current_rx_transfer_amount_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the number of bytes received in the current transaction.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_current_tx_transfer_amount_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the number of bytes transferred in the current transaction.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_disable | ( | NRF_TDM_Type * | p_reg | ) |
Function for disabling the TDM peripheral.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_enable | ( | NRF_TDM_Type * | p_reg | ) |
Function for enabling the TDM peripheral.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE bool nrf_tdm_enable_check | ( | NRF_TDM_Type * | p_reg | ) |
Function for checking if the TDM peripheral is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The TDM is enabled. |
| false | The TDM is not enabled. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_event_address_get | ( | NRF_TDM_Type const * | p_reg, |
| nrf_tdm_event_t | event ) |
Function for getting the address of the specified TDM event register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Specified event. |
| NRF_STATIC_INLINE bool nrf_tdm_event_check | ( | NRF_TDM_Type const * | p_reg, |
| nrf_tdm_event_t | event ) |
Function for retrieving the state of the TDM 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_tdm_event_clear | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_event_t | event ) |
Function for clearing the specified TDM event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to clear. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_fsync_pin_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the FSYNC pin selection.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_int_disable | ( | NRF_TDM_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling specified interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_tdm_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_tdm_int_enable | ( | NRF_TDM_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling specified interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_tdm_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_int_enable_check | ( | NRF_TDM_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_tdm_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_last_rx_transfer_amount_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the number of bytes received in the last transaction. The value has been updated after the END event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_last_tx_transfer_amount_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the number of bytes transferred in the last transaction. The value has been updated after the END event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_mck_configure | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_src_t | clksrc, | ||
| bool | enable_bypass ) |
Function for configuring TDM master Clock.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | clksrc | TDM master clock source selection. |
| [in] | enable_bypass | Bypass clock generator. MCK will be equal to source input. If bypass is enabled the MCK.DIV setting has no effect. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_mck_pin_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the MCK pin selection.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_mck_set | ( | NRF_TDM_Type * | p_reg, |
| bool | enable ) |
Function for setting the master clock generator.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if the master clock generator is to be enabled, false otherwise. |
| NRF_STATIC_INLINE void nrf_tdm_ors_set | ( | NRF_TDM_Type * | p_reg, |
| uint32_t | ors ) |
Function for setting over-read sample.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | ors | Value that will be transmitted in case of over-read of TXD buffer. |
| NRF_STATIC_INLINE void nrf_tdm_pins_get | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_pins_t * | p_pins ) |
Function for getting TDM pins configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the structure to be filled with TDM pins configuration. |
| NRF_STATIC_INLINE void nrf_tdm_pins_set | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_pins_t const * | p_pins ) |
Function for configuring TDM pins.
Usage of the SDOUT, SDIN, and MCK signals is optional. If a given signal is not needed, pass the NRF_TDM_PIN_NOT_CONNECTED value instead of its pin number.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the structure with pins selection. |
| NRF_STATIC_INLINE void nrf_tdm_publish_clear | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_event_t | event ) |
Function for clearing the publish configuration for a given TDM 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 uint32_t nrf_tdm_publish_get | ( | NRF_TDM_Type const * | p_reg, |
| nrf_tdm_event_t | event ) |
Function for getting the publish configuration for a given TDM event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to read the configuration. |
| NRF_STATIC_INLINE void nrf_tdm_publish_set | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_event_t | event, | ||
| uint8_t | channel ) |
Function for setting the publish configuration for a given TDM 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_tdm_rx_buffer_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the pointer to the receive buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_rx_buffer_set | ( | NRF_TDM_Type * | p_reg, |
| uint32_t * | p_buffer ) |
Function for setting the pointer to the receive buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the receive buffer. |
| NRF_STATIC_INLINE void nrf_tdm_rx_count_set | ( | NRF_TDM_Type * | p_reg, |
| uint16_t | size ) |
Function for setting up the TDM RX transfer length.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | size | Size of the buffer (in 32-bit words). |
| NRF_STATIC_INLINE void nrf_tdm_sck_configure | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_src_t | clksrc, | ||
| bool | enable_bypass ) |
Function for configuring TDM serial Clock.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | clksrc | TDM serial clock source selection. |
| [in] | enable_bypass | Bypass clock generator. SCK will be equal to source input. If bypass is enabled the SCK.DIV setting has no effect. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_sck_pin_get | ( | NRF_TDM_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 uint32_t nrf_tdm_sdin_pin_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the SDIN pin selection.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_tdm_sdout_pin_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the SDOUT pin selection.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_subscribe_clear | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_task_t | task ) |
Function for clearing the subscribe configuration for a given TDM 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 uint32_t nrf_tdm_subscribe_get | ( | NRF_TDM_Type const * | p_reg, |
| nrf_tdm_task_t | task ) |
Function for getting the subscribe configuration for a given TDM task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to read the configuration. |
| NRF_STATIC_INLINE void nrf_tdm_subscribe_set | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_task_t | task, | ||
| uint8_t | channel ) |
Function for setting the subscribe configuration for a given TDM 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_tdm_task_address_get | ( | NRF_TDM_Type const * | p_reg, |
| nrf_tdm_task_t | task ) |
Function for getting the address of the specified TDM task register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Specified task. |
| NRF_STATIC_INLINE void nrf_tdm_task_trigger | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_task_t | task ) |
Function for activating the specified TDM task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task to be activated. |
| NRF_STATIC_INLINE void nrf_tdm_transfer_direction_set | ( | NRF_TDM_Type * | p_reg, |
| nrf_tdm_rxtxen_t | dir ) |
Function for setting up the direction of the TDM transfer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | dir | Transmission direction. |
| NRF_STATIC_INLINE uint32_t * nrf_tdm_tx_buffer_get | ( | NRF_TDM_Type const * | p_reg | ) |
Function for getting the pointer to the transmit buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_tdm_tx_buffer_set | ( | NRF_TDM_Type * | p_reg, |
| uint32_t const * | p_buffer ) |
Function for setting the pointer to the transmit buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the transmit buffer. |
| NRF_STATIC_INLINE void nrf_tdm_tx_count_set | ( | NRF_TDM_Type * | p_reg, |
| uint16_t | size ) |
Function for setting up the TDM TX transfer length.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | size | Size of the buffer (in 32-bit words). |