nrfx 2.5
Macros | Enumerations | Functions
NFCT HAL

Hardware access layer (HAL) for the Near Field Communication Tag (NFCT) peripheral. More...

Macros

#define NRF_NFCT_CRC_SIZE   2
 
#define NRF_NFCT_DISABLE_ALL_INT   0xFFFFFFFF
 
#define NRF_NFCT_MOD_CTRL_PIN_NOT_CONNECTED   0xFFFFFFFF
 This value can be used as a parameter for the nrf_nfct_mod_ctrl_pin_set function to specify that a given NFCT signal (MODULATION CONTROL) must not be connected to a physical pin.
 

Enumerations

enum  nrf_nfct_task_t {
  NRF_NFCT_TASK_ACTIVATE = offsetof(NRF_NFCT_Type, TASKS_ACTIVATE),
  NRF_NFCT_TASK_DISABLE = offsetof(NRF_NFCT_Type, TASKS_DISABLE),
  NRF_NFCT_TASK_SENSE = offsetof(NRF_NFCT_Type, TASKS_SENSE),
  NRF_NFCT_TASK_STARTTX = offsetof(NRF_NFCT_Type, TASKS_STARTTX),
  NRF_NFCT_TASK_ENABLERXDATA = offsetof(NRF_NFCT_Type, TASKS_ENABLERXDATA),
  NRF_NFCT_TASK_GOIDLE = offsetof(NRF_NFCT_Type, TASKS_GOIDLE),
  NRF_NFCT_TASK_GOSLEEP = offsetof(NRF_NFCT_Type, TASKS_GOSLEEP)
}
 NFCT tasks. More...
 
enum  nrf_nfct_event_t {
  NRF_NFCT_EVENT_READY = offsetof(NRF_NFCT_Type, EVENTS_READY),
  NRF_NFCT_EVENT_FIELDDETECTED = offsetof(NRF_NFCT_Type, EVENTS_FIELDDETECTED),
  NRF_NFCT_EVENT_FIELDLOST = offsetof(NRF_NFCT_Type, EVENTS_FIELDLOST),
  NRF_NFCT_EVENT_TXFRAMESTART = offsetof(NRF_NFCT_Type, EVENTS_TXFRAMESTART),
  NRF_NFCT_EVENT_TXFRAMEEND = offsetof(NRF_NFCT_Type, EVENTS_TXFRAMEEND),
  NRF_NFCT_EVENT_RXFRAMESTART = offsetof(NRF_NFCT_Type, EVENTS_RXFRAMESTART),
  NRF_NFCT_EVENT_RXFRAMEEND = offsetof(NRF_NFCT_Type, EVENTS_RXFRAMEEND),
  NRF_NFCT_EVENT_ERROR = offsetof(NRF_NFCT_Type, EVENTS_ERROR),
  NRF_NFCT_EVENT_RXERROR = offsetof(NRF_NFCT_Type, EVENTS_RXERROR),
  NRF_NFCT_EVENT_ENDRX = offsetof(NRF_NFCT_Type, EVENTS_ENDRX),
  NRF_NFCT_EVENT_ENDTX = offsetof(NRF_NFCT_Type, EVENTS_ENDTX),
  NRF_NFCT_EVENT_AUTOCOLRESSTARTED = offsetof(NRF_NFCT_Type, EVENTS_AUTOCOLRESSTARTED),
  NRF_NFCT_EVENT_COLLISION = offsetof(NRF_NFCT_Type, EVENTS_COLLISION),
  NRF_NFCT_EVENT_SELECTED = offsetof(NRF_NFCT_Type, EVENTS_SELECTED),
  NRF_NFCT_EVENT_STARTED = offsetof(NRF_NFCT_Type, EVENTS_STARTED)
}
 NFCT events. More...
 
enum  nrf_nfct_short_mask_t {
  NRF_NFCT_SHORT_FIELDDETECTED_ACTIVATE_MASK = NFCT_SHORTS_FIELDDETECTED_ACTIVATE_Msk,
  NRF_NFCT_SHORT_FIELDLOST_SENSE_MASK = NFCT_SHORTS_FIELDLOST_SENSE_Msk,
  NRF_NFCT_SHORT_TXFRAMEEND_ENABLERXDATA_MASK = NFCT_SHORTS_TXFRAMEEND_ENABLERXDATA_Msk
}
 NFCT shortcuts. More...
 
enum  nrf_nfct_int_mask_t {
  NRF_NFCT_INT_READY_MASK = NFCT_INTEN_READY_Msk,
  NRF_NFCT_INT_FIELDDETECTED_MASK = NFCT_INTEN_FIELDDETECTED_Msk,
  NRF_NFCT_INT_FIELDLOST_MASK = NFCT_INTEN_FIELDLOST_Msk,
  NRF_NFCT_INT_TXFRAMESTART_MASK = NFCT_INTEN_TXFRAMESTART_Msk,
  NRF_NFCT_INT_TXFRAMEEND_MASK = NFCT_INTEN_TXFRAMEEND_Msk,
  NRF_NFCT_INT_RXFRAMESTART_MASK = NFCT_INTEN_RXFRAMESTART_Msk,
  NRF_NFCT_INT_RXFRAMEEND_MASK = NFCT_INTEN_RXFRAMEEND_Msk,
  NRF_NFCT_INT_ERROR_MASK = NFCT_INTEN_ERROR_Msk,
  NRF_NFCT_INT_RXERROR_MASK = NFCT_INTEN_RXERROR_Msk,
  NRF_NFCT_INT_ENDRX_MASK = NFCT_INTEN_ENDRX_Msk,
  NRF_NFCT_INT_ENDTX_MASK = NFCT_INTEN_ENDTX_Msk,
  NRF_NFCT_INT_AUTOCOLRESSTARTED_MASK = NFCT_INTEN_AUTOCOLRESSTARTED_Msk,
  NRF_NFCT_INT_COLLISION_MASK = NFCT_INTEN_COLLISION_Msk,
  NRF_NFCT_INT_SELECTED_MASK = NFCT_INTEN_SELECTED_Msk,
  NRF_NFCT_INT_STARTED_MASK = NFCT_INTEN_STARTED_Msk
}
 NFCT interrupts. More...
 
enum  nrf_nfct_error_status_t {
  NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK = NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk,
  NRF_NFCT_ERROR_NFCFIELDTOOSTRONG_MASK = NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk,
  NRF_NFCT_ERROR_NFCFIELDTOOWEAK_MASK = NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk
}
 NFC error status bit masks. More...
 
enum  nrf_nfct_rx_frame_status_t {
  NRF_NFCT_RX_FRAME_STATUS_CRC_MASK = NFCT_FRAMESTATUS_RX_CRCERROR_Msk,
  NRF_NFCT_RX_FRAME_STATUS_PARITY_MASK = NFCT_FRAMESTATUS_RX_PARITYSTATUS_Msk,
  NRF_NFCT_RX_FRAME_STATUS_OVERRUN_MASK = NFCT_FRAMESTATUS_RX_OVERRUN_Msk
}
 NFC received frame status bit masks. More...
 
enum  nrf_nfct_tag_state_t {
  NRF_NFCT_TAG_STATE_DISABLED = NFCT_NFCTAGSTATE_NFCTAGSTATE_Disabled,
  NRF_NFCT_TAG_STATE_RAMP_UP = NFCT_NFCTAGSTATE_NFCTAGSTATE_RampUp,
  NRF_NFCT_TAG_STATE_IDLE = NFCT_NFCTAGSTATE_NFCTAGSTATE_Idle,
  NRF_NFCT_TAG_STATE_RECEIVE = NFCT_NFCTAGSTATE_NFCTAGSTATE_Receive,
  NRF_NFCT_TAG_STATE_FRAME_DELAY = NFCT_NFCTAGSTATE_NFCTAGSTATE_FrameDelay,
  NRF_NFCT_TAG_STATE_TRANSMIT = NFCT_NFCTAGSTATE_NFCTAGSTATE_Transmit
}
 NFC tag state. More...
 
enum  nrf_nfct_sleep_state_t {
  NRF_NFCT_SLEEP_STATE_IDLE = NFCT_SLEEPSTATE_SLEEPSTATE_Idle,
  NRF_NFCT_SLEEP_STATE_SLEEP_A = NFCT_SLEEPSTATE_SLEEPSTATE_SleepA
}
 NFC tag sleep state. More...
 
enum  nrf_nfct_field_state_t {
  NRF_NFCT_FIELD_STATE_PRESENT_MASK = NFCT_FIELDPRESENT_FIELDPRESENT_Msk,
  NRF_NFCT_FIELD_STATE_LOCK_MASK = NFCT_FIELDPRESENT_LOCKDETECT_Msk
}
 NFC field state bit masks. More...
 
enum  nrf_nfct_frame_delay_mode_t {
  NRF_NFCT_FRAME_DELAY_MODE_FREERUN = NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_FreeRun,
  NRF_NFCT_FRAME_DELAY_MODE_WINDOW = NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_Window,
  NRF_NFCT_FRAME_DELAY_MODE_EXACTVAL = NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_ExactVal,
  NRF_NFCT_FRAME_DELAY_MODE_WINDOWGRID = NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_WindowGrid
}
 NFC frame delay mode for data transmission. More...
 
enum  nrf_nfct_tx_frame_config_t {
  NRF_NFCT_TX_FRAME_CONFIG_PARITY = NFCT_TXD_FRAMECONFIG_PARITY_Msk,
  NRF_NFCT_TX_FRAME_CONFIG_DISCARD_START = NFCT_TXD_FRAMECONFIG_DISCARDMODE_Msk,
  NRF_NFCT_TX_FRAME_CONFIG_SOF = NFCT_TXD_FRAMECONFIG_SOF_Msk,
  NRF_NFCT_TX_FRAME_CONFIG_CRC16 = NFCT_TXD_FRAMECONFIG_CRCMODETX_Msk
}
 Bit masks for NFC transmission frame configuration. More...
 
enum  nrf_nfct_rx_frame_config_t {
  NRF_NFCT_RX_FRAME_CONFIG_PARITY = NFCT_RXD_FRAMECONFIG_PARITY_Msk,
  NRF_NFCT_RX_FRAME_CONFIG_SOF = NFCT_RXD_FRAMECONFIG_SOF_Msk,
  NRF_NFCT_RX_FRAME_CONFIG_CRC16 = NFCT_RXD_FRAMECONFIG_CRCMODERX_Msk
}
 Bit masks for NFC reception frame configuration. More...
 
enum  nrf_nfct_sensres_nfcid1_size_t {
  NRF_NFCT_SENSRES_NFCID1_SIZE_SINGLE,
  NRF_NFCT_SENSRES_NFCID1_SIZE_DOUBLE,
  NRF_NFCT_SENSRES_NFCID1_SIZE_TRIPLE,
  NRF_NFCT_SENSRES_NFCID1_SIZE_DEFAULT
}
 'NFCI1 size' NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification. More...
 
enum  nrf_nfct_sensres_bit_frame_sdd_t {
  NRF_NFCT_SENSRES_BIT_FRAME_SDD_00000,
  NRF_NFCT_SENSRES_BIT_FRAME_SDD_00001,
  NRF_NFCT_SENSRES_BIT_FRAME_SDD_00010,
  NRF_NFCT_SENSRES_BIT_FRAME_SDD_00100,
  NRF_NFCT_SENSRES_BIT_FRAME_SDD_01000,
  NRF_NFCT_SENSRES_BIT_FRAME_SDD_10000
}
 'Bit frame SDD' NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification. More...
 
enum  nrf_nfct_sensres_platform_config_t {
  NRF_NFCT_SENSRES_PLATFORM_CONFIG_T1T = 6 << NFCT_SENSRES_PLATFCONFIG_Pos,
  NRF_NFCT_SENSRES_PLATFORM_CONFIG_OTHER = 0 << NFCT_SENSRES_PLATFCONFIG_Pos
}
 'Platofrm Config' NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification. More...
 
enum  nrf_nfct_selres_t {
  NRF_NFCT_SELRES_CASCADE_MASK = NFCT_SELRES_CASCADE_Msk,
  NRF_NFCT_SELRES_PROTOCOL_MASK = NFCT_SELRES_PROTOCOL_Msk
}
 Bit masks for SEL_RES NFC frame configuration. More...
 
enum  nrf_nfct_selres_protocol_t {
  NRF_NFCT_SELRES_PROTOCOL_T2T = 0,
  NRF_NFCT_SELRES_PROTOCOL_T4AT = 1,
  NRF_NFCT_SELRES_PROTOCOL_NFCDEP = 2,
  NRF_NFCT_SELRES_PROTOCOL_NFCDEP_T4AT = 3
}
 Protocol NFC field (bits b7 and b6) configuration for the SEL_RES frame according to the NFC Forum Digital Protocol Technical Specification. More...
 
enum  nrf_nfct_modulation_ctrl_t {
  NRF_NFCT_MODULATION_CTRL_INVALID = NFCT_MODULATIONCTRL_MODULATIONCTRL_Invalid,
  NRF_NFCT_MODULATION_CTRL_INTERNAL = NFCT_MODULATIONCTRL_MODULATIONCTRL_Internal,
  NRF_NFCT_MODULATION_CTRL_GPIO = NFCT_MODULATIONCTRL_MODULATIONCTRL_ModToGpio,
  NRF_NFCT_MODULATION_CTRL_INTERNAL_GPIO = NFCT_MODULATIONCTRL_MODULATIONCTRL_InternalAndModToGpio
}
 Modulation output configuration. More...
 

Functions

NRF_STATIC_INLINE void nrf_nfct_task_trigger (NRF_NFCT_Type *p_reg, nrf_nfct_task_t task)
 Function for activating a specific NFCT task. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_task_address_get (NRF_NFCT_Type const *p_reg, nrf_nfct_task_t task)
 Function for returning the address of a specific NFCT task register. More...
 
NRF_STATIC_INLINE void nrf_nfct_event_clear (NRF_NFCT_Type *p_reg, nrf_nfct_event_t event)
 Function for clearing a specific event. More...
 
NRF_STATIC_INLINE bool nrf_nfct_event_check (NRF_NFCT_Type const *p_reg, nrf_nfct_event_t event)
 Function for retrieving the state of the NFCT event. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_event_address_get (NRF_NFCT_Type const *p_reg, nrf_nfct_event_t event)
 Function for returning the address of a specific NFCT event register. More...
 
NRF_STATIC_INLINE void nrf_nfct_shorts_enable (NRF_NFCT_Type *p_reg, uint32_t short_mask)
 Function for enabling selected shortcuts. More...
 
NRF_STATIC_INLINE void nrf_nfct_shorts_disable (NRF_NFCT_Type *p_reg, uint32_t short_mask)
 Function for disabling selected shortcuts. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_shorts_get (NRF_NFCT_Type const *p_reg)
 Function for retrieving the enabled shortcuts. More...
 
NRF_STATIC_INLINE void nrf_nfct_shorts_set (NRF_NFCT_Type *p_reg, uint32_t short_mask)
 Function for setting shortcuts. More...
 
NRF_STATIC_INLINE void nrf_nfct_int_enable (NRF_NFCT_Type *p_reg, uint32_t mask)
 Function for enabling the selected interrupts. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_int_enable_check (NRF_NFCT_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_int_enable_get (NRF_NFCT_Type const *p_reg)
 Function for retrieving the information about enabled interrupts. More...
 
NRF_STATIC_INLINE void nrf_nfct_int_disable (NRF_NFCT_Type *p_reg, uint32_t mask)
 Function for disabling the selected interrupts. More...
 
NRF_STATIC_INLINE void nrf_nfct_mod_ctrl_pin_set (NRF_NFCT_Type *p_reg, uint32_t mod_ctrl_pin)
 Function for configuring the NFCT modulation control pin. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_mod_ctrl_pin_get (NRF_NFCT_Type const *p_reg)
 Function for getting the modulation control pin selection. More...
 
NRF_STATIC_INLINE void nrf_nfct_modulation_output_set (NRF_NFCT_Type *p_reg, nrf_nfct_modulation_ctrl_t mod_ctrl)
 Function for setting the modulation output. It enables the output to a GPIO pin which can be connected to a second external. More...
 
NRF_STATIC_INLINE nrf_nfct_modulation_ctrl_t nrf_nfct_modulation_output_get (NRF_NFCT_Type const *p_reg)
 Function for getting the modulation output configuration. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_error_status_get (NRF_NFCT_Type const *p_reg)
 Function for getting the NFCT error status. More...
 
NRF_STATIC_INLINE void nrf_nfct_error_status_clear (NRF_NFCT_Type *p_reg, uint32_t error_flag)
 Function for clearing the NFCT error status. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_rx_frame_status_get (NRF_NFCT_Type const *p_reg)
 Function for getting the NFC frame reception status. More...
 
NRF_STATIC_INLINE void nrf_nfct_rx_frame_status_clear (NRF_NFCT_Type *p_reg, uint32_t framestatus_flags)
 Function for clearing the NFC frame reception status. More...
 
NRF_STATIC_INLINE nrf_nfct_tag_state_t nrf_nfct_tag_state_get (NRF_NFCT_Type const *p_reg)
 Function for getting the NFC tag state. More...
 
NRF_STATIC_INLINE nrf_nfct_sleep_state_t nrf_nfct_sleep_state_get (NRF_NFCT_Type const *p_reg)
 Function for getting the NFC tag sleep state during the automatic collision resolution. More...
 
NRF_STATIC_INLINE uint8_t nrf_nfct_field_status_get (NRF_NFCT_Type const *p_reg)
 Function for getting the status of the external NFC field detection. More...
 
NRF_STATIC_INLINE uint16_t nrf_nfct_frame_delay_min_get (NRF_NFCT_Type const *p_reg)
 Function for getting the minimum Frame Delay Time value. More...
 
NRF_STATIC_INLINE void nrf_nfct_frame_delay_min_set (NRF_NFCT_Type *p_reg, uint16_t frame_delay_min)
 Function for setting the minimum Frame Delay Time value. More...
 
NRF_STATIC_INLINE uint32_t nrf_nfct_frame_delay_max_get (NRF_NFCT_Type const *p_reg)
 Function for getting the maximum Frame Delay Time value. More...
 
NRF_STATIC_INLINE void nrf_nfct_frame_delay_max_set (NRF_NFCT_Type *p_reg, uint32_t frame_delay_max)
 Function for setting the maximum Frame Delay Time value. More...
 
NRF_STATIC_INLINE nrf_nfct_frame_delay_mode_t nrf_nfct_frame_delay_mode_get (NRF_NFCT_Type const *p_reg)
 Function for getting the Frame Delay Mode configuration. More...
 
NRF_STATIC_INLINE void nrf_nfct_frame_delay_mode_set (NRF_NFCT_Type *p_reg, nrf_nfct_frame_delay_mode_t frame_delay_mode)
 Function for setting the NFC Frame Delay Mode configuration. More...
 
NRF_STATIC_INLINE uint8_t * nrf_nfct_rxtx_buffer_get (NRF_NFCT_Type const *p_reg)
 Function for getting the pointer to the NFCT RX/TX buffer. More...
 
NRF_STATIC_INLINE void nrf_nfct_rxtx_buffer_set (NRF_NFCT_Type *p_reg, uint8_t *p_rxtx_buf, uint16_t max_txrx_len)
 Function for setting the the NFCT RX/TX buffer (address and maximum length). More...
 
NRF_STATIC_INLINE uint16_t nrf_nfct_max_rxtx_length_get (NRF_NFCT_Type const *p_reg)
 Function for getting the NFCT RX/TX maximum buffer length. More...
 
NRF_STATIC_INLINE uint8_t nrf_nfct_tx_frame_config_get (NRF_NFCT_Type const *p_reg)
 Function for getting the flags for NFC frame transmission configuration. More...
 
NRF_STATIC_INLINE void nrf_nfct_tx_frame_config_set (NRF_NFCT_Type *p_reg, uint8_t flags)
 Function for setting up the flags of the NFC frame transmission configuration. More...
 
NRF_STATIC_INLINE uint16_t nrf_nfct_tx_bits_get (NRF_NFCT_Type const *p_reg)
 Function for getting the length of the configured transmission frame. More...
 
NRF_STATIC_INLINE void nrf_nfct_tx_bits_set (NRF_NFCT_Type *p_reg, uint16_t tx_bits)
 Function for setting up the NFC frame transmission. More...
 
NRF_STATIC_INLINE uint8_t nrf_nfct_rx_frame_config_get (NRF_NFCT_Type const *p_reg)
 Function for getting the flags of the NFC frame reception configuration. More...
 
NRF_STATIC_INLINE void nrf_nfct_rx_frame_config_set (NRF_NFCT_Type *p_reg, uint8_t flags)
 Function for setting up the NFC frame reception. More...
 
NRF_STATIC_INLINE uint16_t nrf_nfct_rx_bits_get (NRF_NFCT_Type const *p_reg, bool crc_excluded)
 Function for getting the number of bits received from the NFC poller. More...
 
NRF_STATIC_INLINE nrf_nfct_sensres_nfcid1_size_t nrf_nfct_nfcid1_get (NRF_NFCT_Type const *p_reg, uint8_t *p_nfcid1_buf)
 Function for getting the NFCID1 (NFC tag identifier). More...
 
NRF_STATIC_INLINE void nrf_nfct_nfcid1_set (NRF_NFCT_Type *p_reg, uint8_t const *p_nfcid1_buf, nrf_nfct_sensres_nfcid1_size_t nfcid1_size)
 Function for setting the NFCID1 (NFC tag identifier). More...
 
NRF_STATIC_INLINE bool nrf_nfct_autocolres_is_enabled (NRF_NFCT_Type const *p_reg)
 Function for getting the setting for the automatic collision resolution. More...
 
NRF_STATIC_INLINE void nrf_nfct_autocolres_enable (NRF_NFCT_Type *p_reg)
 Function for enabling the automatic collision resolution. More...
 
NRF_STATIC_INLINE void nrf_nfct_autocolres_disable (NRF_NFCT_Type *p_reg)
 Function for disabling the automatic collision resolution. More...
 
NRF_STATIC_INLINE nrf_nfct_sensres_nfcid1_size_t nrf_nfct_sensres_nfcid1_size_get (NRF_NFCT_Type const *p_reg)
 Function for getting the NFCID1 size from the SENS_RES frame configuration. More...
 
NRF_STATIC_INLINE void nrf_nfct_sensres_nfcid1_size_set (NRF_NFCT_Type *p_reg, nrf_nfct_sensres_nfcid1_size_t nfcid1_size)
 Function for setting the NFCID1 (tag identifier) size.field in the SENS_RES frame configuration. More...
 
NRF_STATIC_INLINE nrf_nfct_sensres_bit_frame_sdd_t nrf_nfct_sensres_bit_frame_sdd_get (NRF_NFCT_Type const *p_reg)
 Function for getting the Bit Frame SDD field from the SENS_RES frame configuration. More...
 
NRF_STATIC_INLINE void nrf_nfct_sensres_bit_frame_sdd_set (NRF_NFCT_Type *p_reg, nrf_nfct_sensres_bit_frame_sdd_t bit_frame_sdd)
 Function for setting the Bit Frame SDD field in the SENS_RES frame configuration. More...
 
NRF_STATIC_INLINE nrf_nfct_sensres_platform_config_t nrf_nfct_sensres_platform_config_get (NRF_NFCT_Type const *p_reg)
 Function for getting the Platform Config field from the SENS_RES frame configuration. More...
 
NRF_STATIC_INLINE void nrf_nfct_sensres_platform_config_set (NRF_NFCT_Type *p_reg, nrf_nfct_sensres_platform_config_t platform_config)
 Function for setting the Platform Config field in the SENS_RES frame configuration. More...
 
NRF_STATIC_INLINE bool nrf_nfct_selres_cascade_check (NRF_NFCT_Type const *p_reg)
 Function for checking the CASCADE bit of the SEL_RES frame. More...
 
NRF_STATIC_INLINE nrf_nfct_selres_protocol_t nrf_nfct_selres_protocol_get (NRF_NFCT_Type const *p_reg)
 Function for getting the Protocol field in the SEL_RES frame. More...
 
NRF_STATIC_INLINE void nrf_nfct_selres_protocol_set (NRF_NFCT_Type *p_reg, nrf_nfct_selres_protocol_t sel_res_protocol)
 Function for setting the Protocol field in the SEL_RES frame configuration. More...
 

Detailed Description

Hardware access layer (HAL) for the Near Field Communication Tag (NFCT) peripheral.

Macro Definition Documentation

◆ NRF_NFCT_CRC_SIZE

#define NRF_NFCT_CRC_SIZE   2

CRC size in bytes.

◆ NRF_NFCT_DISABLE_ALL_INT

#define NRF_NFCT_DISABLE_ALL_INT   0xFFFFFFFF

Value to disable all interrupts.

Enumeration Type Documentation

◆ nrf_nfct_error_status_t

NFC error status bit masks.

Enumerator
NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK 

Timeout of the Frame Delay Timer (no frame transmission started in the FDT window).

NRF_NFCT_ERROR_NFCFIELDTOOSTRONG_MASK 

Field level is too high at maximum load resistance.

NRF_NFCT_ERROR_NFCFIELDTOOWEAK_MASK 

Field level is too low at minimum load resistance.

◆ nrf_nfct_event_t

NFCT events.

Enumerator
NRF_NFCT_EVENT_READY 

The NFCT peripheral is ready to receive and send frames.

NRF_NFCT_EVENT_FIELDDETECTED 

Remote NFC field is detected.

NRF_NFCT_EVENT_FIELDLOST 

Remote NFC field is lost.

NRF_NFCT_EVENT_TXFRAMESTART 

The start of the first symbol of a transmitted frame.

NRF_NFCT_EVENT_TXFRAMEEND 

The end of the last transmitted on-air symbol of a frame.

NRF_NFCT_EVENT_RXFRAMESTART 

The end of the first symbol of a received frame.

NRF_NFCT_EVENT_RXFRAMEEND 

Received data was checked (CRC, parity) and transferred to RAM, and EasyDMA ended accessing the RX buffer.

NRF_NFCT_EVENT_ERROR 

NFC error reported. The ERRORSTATUS register contains details on the source of the error.

NRF_NFCT_EVENT_RXERROR 

NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.

NRF_NFCT_EVENT_ENDRX 

RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.

NRF_NFCT_EVENT_ENDTX 

Transmission of data in RAM ended, and EasyDMA ended accessing the TX buffer.

NRF_NFCT_EVENT_AUTOCOLRESSTARTED 

Auto collision resolution process started.

NRF_NFCT_EVENT_COLLISION 

NFC auto collision resolution error reported.

NRF_NFCT_EVENT_SELECTED 

NFC auto collision resolution successfully completed.

NRF_NFCT_EVENT_STARTED 

EasyDMA is ready to receive or send frames.

◆ nrf_nfct_field_state_t

NFC field state bit masks.

Enumerator
NRF_NFCT_FIELD_STATE_PRESENT_MASK 

Field presence mask.

NRF_NFCT_FIELD_STATE_LOCK_MASK 

Field lock mask.

◆ nrf_nfct_frame_delay_mode_t

NFC frame delay mode for data transmission.

Enumerator
NRF_NFCT_FRAME_DELAY_MODE_FREERUN 

Frame transmission starts when NRF_NFCT_TASK_STARTTX is set (delay timer is not used).

NRF_NFCT_FRAME_DELAY_MODE_WINDOW 

Frame transmission starts in a window between FRAMEDELAYMIN and FRAMEDELAYMAX.

NRF_NFCT_FRAME_DELAY_MODE_EXACTVAL 

Frame transmission starts when the delay timer reaches FRAMEDELAYMAX.

NRF_NFCT_FRAME_DELAY_MODE_WINDOWGRID 

Frame transmission starts in a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX.

◆ nrf_nfct_int_mask_t

NFCT interrupts.

Enumerator
NRF_NFCT_INT_READY_MASK 

Interrupt on READY event.

NRF_NFCT_INT_FIELDDETECTED_MASK 

Interrupt on FIELDDETECTED event.

NRF_NFCT_INT_FIELDLOST_MASK 

Interrupt on FIELDLOST event.

NRF_NFCT_INT_TXFRAMESTART_MASK 

Interrupt on TXFRAMESTART event.

NRF_NFCT_INT_TXFRAMEEND_MASK 

Interrupt on TXFRAMEEND event.

NRF_NFCT_INT_RXFRAMESTART_MASK 

Interrupt on RXFRAMESTART event.

NRF_NFCT_INT_RXFRAMEEND_MASK 

Interrupt on RXFRAMEEND event.

NRF_NFCT_INT_ERROR_MASK 

Interrupt on ERROR event.

NRF_NFCT_INT_RXERROR_MASK 

Interrupt on RXERROR event.

NRF_NFCT_INT_ENDRX_MASK 

Interrupt on ENDRX event.

NRF_NFCT_INT_ENDTX_MASK 

Interrupt on ENDTX event.

NRF_NFCT_INT_AUTOCOLRESSTARTED_MASK 

Interrupt on AUTOCOLRESSTARTED event.

NRF_NFCT_INT_COLLISION_MASK 

Interrupt on COLLISION event.

NRF_NFCT_INT_SELECTED_MASK 

Interrupt on SELECTED event.

NRF_NFCT_INT_STARTED_MASK 

Interrupt on STARTED event.

◆ nrf_nfct_modulation_ctrl_t

Modulation output configuration.

Enumerator
NRF_NFCT_MODULATION_CTRL_INVALID 

Invalid configuration. Defaults to the same behavior as NRF_NFCT_MODULATION_CTRL_INTERNAL.

NRF_NFCT_MODULATION_CTRL_INTERNAL 

Use internal modulator only.

NRF_NFCT_MODULATION_CTRL_GPIO 

Transmit output digital modulation signal to a GPIO pin.

NRF_NFCT_MODULATION_CTRL_INTERNAL_GPIO 

Use internal modulator and transmit output digital modulation signal to a GPIO pin.

◆ nrf_nfct_rx_frame_config_t

Bit masks for NFC reception frame configuration.

Enumerator
NRF_NFCT_RX_FRAME_CONFIG_PARITY 

Indicates whether parity is expected in the received frames.

NRF_NFCT_RX_FRAME_CONFIG_SOF 

Indicates whether SoF symbol is expected in the received frames.

NRF_NFCT_RX_FRAME_CONFIG_CRC16 

Indicates whether CRC is expected and checked in the received frames.

◆ nrf_nfct_rx_frame_status_t

NFC received frame status bit masks.

Enumerator
NRF_NFCT_RX_FRAME_STATUS_CRC_MASK 

CRC status mask.

NRF_NFCT_RX_FRAME_STATUS_PARITY_MASK 

Parity status mask.

NRF_NFCT_RX_FRAME_STATUS_OVERRUN_MASK 

Overrun status mask.

◆ nrf_nfct_selres_protocol_t

Protocol NFC field (bits b7 and b6) configuration for the SEL_RES frame according to the NFC Forum Digital Protocol Technical Specification.

Enumerator
NRF_NFCT_SELRES_PROTOCOL_T2T 

Type 2 Tag platform.

NRF_NFCT_SELRES_PROTOCOL_T4AT 

Type 4A Tag platform.

NRF_NFCT_SELRES_PROTOCOL_NFCDEP 

NFC-DEP Protocol.

NRF_NFCT_SELRES_PROTOCOL_NFCDEP_T4AT 

NFC-DEP Protocol and Type 4A Tag platform).

◆ nrf_nfct_selres_t

Bit masks for SEL_RES NFC frame configuration.

Enumerator
NRF_NFCT_SELRES_CASCADE_MASK 

SEL_RES Cascade field bit mask.

NRF_NFCT_SELRES_PROTOCOL_MASK 

SEL_RES Protocol field bit mask.

◆ nrf_nfct_sensres_bit_frame_sdd_t

'Bit frame SDD' NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification.

Enumerator
NRF_NFCT_SENSRES_BIT_FRAME_SDD_00000 

SDD pattern 00000.

NRF_NFCT_SENSRES_BIT_FRAME_SDD_00001 

SDD pattern 00001.

NRF_NFCT_SENSRES_BIT_FRAME_SDD_00010 

SDD pattern 00010.

NRF_NFCT_SENSRES_BIT_FRAME_SDD_00100 

SDD pattern 00100.

NRF_NFCT_SENSRES_BIT_FRAME_SDD_01000 

SDD pattern 01000.

NRF_NFCT_SENSRES_BIT_FRAME_SDD_10000 

SDD pattern 10000.

◆ nrf_nfct_sensres_nfcid1_size_t

'NFCI1 size' NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification.

Enumerator
NRF_NFCT_SENSRES_NFCID1_SIZE_SINGLE 

Single size NFCID1 (4 bytes).

NRF_NFCT_SENSRES_NFCID1_SIZE_DOUBLE 

Double size NFCID1 (7 bytes).

NRF_NFCT_SENSRES_NFCID1_SIZE_TRIPLE 

Triple size NFCID1 (10 bytes).

NRF_NFCT_SENSRES_NFCID1_SIZE_DEFAULT 

Default size. Use this option to leave NFCID1 size unchanged.

◆ nrf_nfct_sensres_platform_config_t

'Platofrm Config' NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification.

Enumerator
NRF_NFCT_SENSRES_PLATFORM_CONFIG_T1T 

SENS_RES 'Platform Config' field (b4-b1) value for Type 1 Tag platform. SENS_RES 'Platform Config' field (b7-b6) value for any platform except Type 1 Tag platform.

◆ nrf_nfct_short_mask_t

NFCT shortcuts.

Enumerator
NRF_NFCT_SHORT_FIELDDETECTED_ACTIVATE_MASK 

Shortcut between the FIELDDETECTED event and the ACTIVATE task.

NRF_NFCT_SHORT_FIELDLOST_SENSE_MASK 

Shortcut between the FIELDLOST event and the SENSE task.

NRF_NFCT_SHORT_TXFRAMEEND_ENABLERXDATA_MASK 

Shortcut between the TXFRAMEEND event and the ENABLERXDATA task.

◆ nrf_nfct_sleep_state_t

NFC tag sleep state.

Shows the sleep state during automatic collision resolution according to the NFC Forum Activity Technical Specification v2.0.

Enumerator
NRF_NFCT_SLEEP_STATE_IDLE 

'IDLE' state.

NRF_NFCT_SLEEP_STATE_SLEEP_A 

'SLEEP_A' state.

◆ nrf_nfct_tag_state_t

NFC tag state.

Enumerator
NRF_NFCT_TAG_STATE_DISABLED 

Disabled or sensing NFC field.

NRF_NFCT_TAG_STATE_RAMP_UP 

Ramping up.

NRF_NFCT_TAG_STATE_IDLE 

Idle.

NRF_NFCT_TAG_STATE_RECEIVE 

Receiving data.

NRF_NFCT_TAG_STATE_FRAME_DELAY 

Counting Frame Delay Time since the last symbol of the last received frame.

NRF_NFCT_TAG_STATE_TRANSMIT 

Transmitting data.

◆ nrf_nfct_task_t

NFCT tasks.

Enumerator
NRF_NFCT_TASK_ACTIVATE 

Activate the NFCT peripheral for the incoming and outgoing frames, change state to activated.

NRF_NFCT_TASK_DISABLE 

Disable the NFCT peripheral.

NRF_NFCT_TASK_SENSE 

Enable the NFC sense field mode, change state to sense mode.

NRF_NFCT_TASK_STARTTX 

Start the transmission of an outgoing frame, change state to transmit.

NRF_NFCT_TASK_ENABLERXDATA 

Initialize EasyDMA for receive.

NRF_NFCT_TASK_GOIDLE 

Force state machine to the IDLE state.

NRF_NFCT_TASK_GOSLEEP 

Force state machine to the SLEEP_A state.

◆ nrf_nfct_tx_frame_config_t

Bit masks for NFC transmission frame configuration.

Enumerator
NRF_NFCT_TX_FRAME_CONFIG_PARITY 

Indicates whether parity is added in the transmitted frames.

NRF_NFCT_TX_FRAME_CONFIG_DISCARD_START 

Indicates whether unused bits are discarded at the start or at the end of the transmitted frames.

NRF_NFCT_TX_FRAME_CONFIG_SOF 

Indicates whether SoF symbol is added in the transmitted frames.

NRF_NFCT_TX_FRAME_CONFIG_CRC16 

Indicates whether CRC is added in the transmitted frames.

Function Documentation

◆ nrf_nfct_autocolres_disable()

NRF_STATIC_INLINE void nrf_nfct_autocolres_disable ( NRF_NFCT_Type *  p_reg)

Function for disabling the automatic collision resolution.

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

The automatic collision resolution mechanism as defined in ISO 14443-3 and NFC Forum Digital Protocol Technical Specification 2.0, section 6.

◆ nrf_nfct_autocolres_enable()

NRF_STATIC_INLINE void nrf_nfct_autocolres_enable ( NRF_NFCT_Type *  p_reg)

Function for enabling the automatic collision resolution.

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

The automatic collision resolution mechanism as defined in ISO 14443-3 and NFC Forum Digital Protocol Technical Specification 2.0, section 6.

◆ nrf_nfct_autocolres_is_enabled()

NRF_STATIC_INLINE bool nrf_nfct_autocolres_is_enabled ( NRF_NFCT_Type const *  p_reg)

Function for getting the setting for the automatic collision resolution.

The automatic collision resolution mechanism as defined in ISO 14443-3 and NFC Forum Digital Protocol Technical Specification 2.0, section 6.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueIf automatic collision resolution is enabled.
falseIf automatic collision resolution is disabled.

◆ nrf_nfct_error_status_clear()

NRF_STATIC_INLINE void nrf_nfct_error_status_clear ( NRF_NFCT_Type *  p_reg,
uint32_t  error_flag 
)

Function for clearing the NFCT error status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]error_flagError flags to be cleared, defined in nrf_nfct_error_status_t.

◆ nrf_nfct_error_status_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_error_status_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the NFCT error status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The NFCT error status flags, defined in nrf_nfct_error_status_t.

◆ nrf_nfct_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_event_address_get ( NRF_NFCT_Type const *  p_reg,
nrf_nfct_event_t  event 
)

Function for returning the address of a specific NFCT event register.

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

◆ nrf_nfct_event_check()

NRF_STATIC_INLINE bool nrf_nfct_event_check ( NRF_NFCT_Type const *  p_reg,
nrf_nfct_event_t  event 
)

Function for retrieving the state of the NFCT 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.

◆ nrf_nfct_event_clear()

NRF_STATIC_INLINE void nrf_nfct_event_clear ( NRF_NFCT_Type *  p_reg,
nrf_nfct_event_t  event 
)

Function for clearing a specific event.

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

◆ nrf_nfct_field_status_get()

NRF_STATIC_INLINE uint8_t nrf_nfct_field_status_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the status of the external NFC field detection.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The NFC field detection status. Status bits can be checked by using nrf_nfct_field_state_t.

◆ nrf_nfct_frame_delay_max_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_frame_delay_max_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the maximum Frame Delay Time value.

This is the maximum value for Frame Delay Timer. It controls the longest time between the last symbol of the last received frame and the start of the transmission of a new TX frame. If no transmission starts before the Frame Delay Timer timeout, NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK is set.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The maximum Frame Delay Time value in 13.56-MHz clock ticks.

◆ nrf_nfct_frame_delay_max_set()

NRF_STATIC_INLINE void nrf_nfct_frame_delay_max_set ( NRF_NFCT_Type *  p_reg,
uint32_t  frame_delay_max 
)

Function for setting the maximum Frame Delay Time value.

This is the maximum value for Frame Delay Timer. It controls the longest time between the last symbol of the last received frame and the start of the transmission of a new TX frame. If no transmission starts before the Frame Delay Timer timeout, NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK is set.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]frame_delay_maxMaximum Frame Delay Time value in 13.56-MHz clock ticks.

◆ nrf_nfct_frame_delay_min_get()

NRF_STATIC_INLINE uint16_t nrf_nfct_frame_delay_min_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the minimum Frame Delay Time value.

This is the minimum value for Frame Delay Timer. It controls the shortest time between the last symbol of the last received frame and the start of the transmission of a new TX frame.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The minimum Frame Delay Time value in 13.56-MHz clock ticks.

◆ nrf_nfct_frame_delay_min_set()

NRF_STATIC_INLINE void nrf_nfct_frame_delay_min_set ( NRF_NFCT_Type *  p_reg,
uint16_t  frame_delay_min 
)

Function for setting the minimum Frame Delay Time value.

This is the minimum value for Frame Delay Timer. It controls the shortest time between the last symbol of the last received frame and the start of the transmission of a new TX frame.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]frame_delay_minMinimum Frame Delay Time value in 13.56-MHz clock ticks.

◆ nrf_nfct_frame_delay_mode_get()

NRF_STATIC_INLINE nrf_nfct_frame_delay_mode_t nrf_nfct_frame_delay_mode_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the Frame Delay Mode configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The configured Frame Delay Mode.

◆ nrf_nfct_frame_delay_mode_set()

NRF_STATIC_INLINE void nrf_nfct_frame_delay_mode_set ( NRF_NFCT_Type *  p_reg,
nrf_nfct_frame_delay_mode_t  frame_delay_mode 
)

Function for setting the NFC Frame Delay Mode configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]frame_delay_modeFrame Delay Mode configuration.

◆ nrf_nfct_int_disable()

NRF_STATIC_INLINE void nrf_nfct_int_disable ( NRF_NFCT_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the selected interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled.

◆ nrf_nfct_int_enable()

NRF_STATIC_INLINE void nrf_nfct_int_enable ( NRF_NFCT_Type *  p_reg,
uint32_t  mask 
)

Function for enabling the selected interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled.

◆ nrf_nfct_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_nfct_int_enable_check ( NRF_NFCT_Type const *  p_reg,
uint32_t  mask 
)

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.
Returns
Mask of enabled interrupts.

◆ nrf_nfct_int_enable_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_int_enable_get ( NRF_NFCT_Type const *  p_reg)

Function for retrieving the information about enabled interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The flags of the enabled interrupts.

◆ nrf_nfct_max_rxtx_length_get()

NRF_STATIC_INLINE uint16_t nrf_nfct_max_rxtx_length_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the NFCT RX/TX maximum buffer length.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The configured maximum receive or transmit length in bytes (size of the RX/TX buffer for EasyDMA).

◆ nrf_nfct_mod_ctrl_pin_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_mod_ctrl_pin_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the modulation control pin selection.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Modulation control pin selection.

◆ nrf_nfct_mod_ctrl_pin_set()

NRF_STATIC_INLINE void nrf_nfct_mod_ctrl_pin_set ( NRF_NFCT_Type *  p_reg,
uint32_t  mod_ctrl_pin 
)

Function for configuring the NFCT modulation control pin.

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

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

◆ nrf_nfct_modulation_output_get()

NRF_STATIC_INLINE nrf_nfct_modulation_ctrl_t nrf_nfct_modulation_output_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the modulation output configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The configured modulation output.

◆ nrf_nfct_modulation_output_set()

NRF_STATIC_INLINE void nrf_nfct_modulation_output_set ( NRF_NFCT_Type *  p_reg,
nrf_nfct_modulation_ctrl_t  mod_ctrl 
)

Function for setting the modulation output. It enables the output to a GPIO pin which can be connected to a second external.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]mod_ctrlModulation control field configuration.

◆ nrf_nfct_nfcid1_get()

NRF_STATIC_INLINE nrf_nfct_sensres_nfcid1_size_t nrf_nfct_nfcid1_get ( NRF_NFCT_Type const *  p_reg,
uint8_t *  p_nfcid1_buf 
)

Function for getting the NFCID1 (NFC tag identifier).

Note
This function always returns the full configuration of the NFCID1 setting (10 bytes), regardless of the NFCID1 size. The NFCID1 size can be configured using nrf_nfct_sensres_nfcid1_size_set or nrf_nfct_nfcid1_set.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_nfcid1_bufPointer to a buffer for the NDFCID1 parameter. The NFCID1 values are in little endian order, that is: |NFCID1_3RD_LAST|NFCID1_2ND_LAST|NFCID1_LAST|.
Returns
Configured NFCID1 length

◆ nrf_nfct_nfcid1_set()

NRF_STATIC_INLINE void nrf_nfct_nfcid1_set ( NRF_NFCT_Type *  p_reg,
uint8_t const *  p_nfcid1_buf,
nrf_nfct_sensres_nfcid1_size_t  nfcid1_size 
)

Function for setting the NFCID1 (NFC tag identifier).

Note
This function also configures the NFCIDSIZE field in the SENSRES register of the NFCT peripheral.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_nfcid1_bufPointer to the buffer with NDFCID1 bytes.
[in]nfcid1_sizeSize of the NFCID1 in bytes.

◆ nrf_nfct_rx_bits_get()

NRF_STATIC_INLINE uint16_t nrf_nfct_rx_bits_get ( NRF_NFCT_Type const *  p_reg,
bool  crc_excluded 
)

Function for getting the number of bits received from the NFC poller.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]crc_excludedFlag for excluding CRC size from calculation.
Returns
Number of received bits including or excluding CRC, and excluding parity and SoF/EoF framing.

< CRC size in bytes.

◆ nrf_nfct_rx_frame_config_get()

NRF_STATIC_INLINE uint8_t nrf_nfct_rx_frame_config_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the flags of the NFC frame reception configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The flags for NFCT frame reception configuration, defined in nrf_nfct_rx_frame_config_t.

◆ nrf_nfct_rx_frame_config_set()

NRF_STATIC_INLINE void nrf_nfct_rx_frame_config_set ( NRF_NFCT_Type *  p_reg,
uint8_t  flags 
)

Function for setting up the NFC frame reception.

Note
Destination for the received data is set using nrf_nfct_rxtx_buffer_set.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]flagsNFCT RX configuration flags. Use nrf_nfct_rx_frame_config_t for setting the desired configuration.

◆ nrf_nfct_rx_frame_status_clear()

NRF_STATIC_INLINE void nrf_nfct_rx_frame_status_clear ( NRF_NFCT_Type *  p_reg,
uint32_t  framestatus_flags 
)

Function for clearing the NFC frame reception status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]framestatus_flagsStatus flags to be cleared, defined in nrf_nfct_rx_frame_status_t.

◆ nrf_nfct_rx_frame_status_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_rx_frame_status_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the NFC frame reception status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The flags of the NFC frame reception status, defined in nrf_nfct_rx_frame_status_t.

◆ nrf_nfct_rxtx_buffer_get()

NRF_STATIC_INLINE uint8_t * nrf_nfct_rxtx_buffer_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the pointer to the NFCT RX/TX buffer.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The configured pointer to the receive or transmit buffer.

◆ nrf_nfct_rxtx_buffer_set()

NRF_STATIC_INLINE void nrf_nfct_rxtx_buffer_set ( NRF_NFCT_Type *  p_reg,
uint8_t *  p_rxtx_buf,
uint16_t  max_txrx_len 
)

Function for setting the the NFCT RX/TX buffer (address and maximum length).

Note
Buffer for the NFC RX/TX data is used by EasyDMA and must be located in RAM.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_rxtx_bufPointer to the receive or transmit buffer.
[in]max_txrx_lenMaximum receive or transmit length in bytes (size of the RAM buffer for EasyDMA).

◆ nrf_nfct_selres_cascade_check()

NRF_STATIC_INLINE bool nrf_nfct_selres_cascade_check ( NRF_NFCT_Type const *  p_reg)

Function for checking the CASCADE bit of the SEL_RES frame.

The CASCADE bit in the SEL_RES register is handled automatically by the NFCT hardware and indicates the status of the NFCID1 read operation to the NFC poller according to the NFC Forum Digital Protocol Speficiation 2.0, section 6.8.2.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueIf NFCID1 read procedure is not complete.
falseIf NFCID1 read procedure is complete.

◆ nrf_nfct_selres_protocol_get()

NRF_STATIC_INLINE nrf_nfct_selres_protocol_t nrf_nfct_selres_protocol_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the Protocol field in the SEL_RES frame.

The SEL_RES frame is handled automatically by the NFCT hardware.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Value of the Protocol field in the SEL_RES frame.

◆ nrf_nfct_selres_protocol_set()

NRF_STATIC_INLINE void nrf_nfct_selres_protocol_set ( NRF_NFCT_Type *  p_reg,
nrf_nfct_selres_protocol_t  sel_res_protocol 
)

Function for setting the Protocol field in the SEL_RES frame configuration.

The SEL_RES frame is handled automatically by the NFCT hardware.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]sel_res_protocolValue of the Protocol field in the SEL_RES frame.

◆ nrf_nfct_sensres_bit_frame_sdd_get()

NRF_STATIC_INLINE nrf_nfct_sensres_bit_frame_sdd_t nrf_nfct_sensres_bit_frame_sdd_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the Bit Frame SDD field from the SENS_RES frame configuration.

The SENS_RES frame is handled automatically by the NFCT hardware.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The Bit Frame SDD field configuration.

◆ nrf_nfct_sensres_bit_frame_sdd_set()

NRF_STATIC_INLINE void nrf_nfct_sensres_bit_frame_sdd_set ( NRF_NFCT_Type *  p_reg,
nrf_nfct_sensres_bit_frame_sdd_t  bit_frame_sdd 
)

Function for setting the Bit Frame SDD field in the SENS_RES frame configuration.

Note
The SENS_RES frame is handled automatically by the NFCT hardware.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]bit_frame_sddThe Bit Frame SDD field configuration.

◆ nrf_nfct_sensres_nfcid1_size_get()

NRF_STATIC_INLINE nrf_nfct_sensres_nfcid1_size_t nrf_nfct_sensres_nfcid1_size_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the NFCID1 size from the SENS_RES frame configuration.

The SENS_RES frame is handled automatically by the NFCT hardware.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
NFCID1 (tag identifier) size.

◆ nrf_nfct_sensres_nfcid1_size_set()

NRF_STATIC_INLINE void nrf_nfct_sensres_nfcid1_size_set ( NRF_NFCT_Type *  p_reg,
nrf_nfct_sensres_nfcid1_size_t  nfcid1_size 
)

Function for setting the NFCID1 (tag identifier) size.field in the SENS_RES frame configuration.

Note
The SENS_RES frame is handled automatically by the NFCT hardware.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]nfcid1_sizeNFCID1 (tag identifier) size.
See also
nrf_nfct_nfcid1_set()

◆ nrf_nfct_sensres_platform_config_get()

NRF_STATIC_INLINE nrf_nfct_sensres_platform_config_t nrf_nfct_sensres_platform_config_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the Platform Config field from the SENS_RES frame configuration.

The SENS_RES frame is handled automatically by the NFCT hardware.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The Platform Config field configuration.

◆ nrf_nfct_sensres_platform_config_set()

NRF_STATIC_INLINE void nrf_nfct_sensres_platform_config_set ( NRF_NFCT_Type *  p_reg,
nrf_nfct_sensres_platform_config_t  platform_config 
)

Function for setting the Platform Config field in the SENS_RES frame configuration.

Note
The SENS_RES frame is handled automatically by the NFCT hardware.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]platform_configThe Platform Config field configuration.

◆ nrf_nfct_shorts_disable()

NRF_STATIC_INLINE void nrf_nfct_shorts_disable ( NRF_NFCT_Type *  p_reg,
uint32_t  short_mask 
)

Function for disabling selected shortcuts.

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

◆ nrf_nfct_shorts_enable()

NRF_STATIC_INLINE void nrf_nfct_shorts_enable ( NRF_NFCT_Type *  p_reg,
uint32_t  short_mask 
)

Function for enabling selected shortcuts.

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

◆ nrf_nfct_shorts_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_shorts_get ( NRF_NFCT_Type const *  p_reg)

Function for retrieving the enabled shortcuts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Flags of the currently enabled shortcuts.

◆ nrf_nfct_shorts_set()

NRF_STATIC_INLINE void nrf_nfct_shorts_set ( NRF_NFCT_Type *  p_reg,
uint32_t  short_mask 
)

Function for setting shortcuts.

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

◆ nrf_nfct_sleep_state_get()

NRF_STATIC_INLINE nrf_nfct_sleep_state_t nrf_nfct_sleep_state_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the NFC tag sleep state during the automatic collision resolution.

The returned value is the last state before the autimatic collision resolution started.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
NRF_NFCT_SLEEP_STATE_IDLENFC tag was in IDLE state before the automatic collision resolution started.
NRF_NFCT_SLEEP_STATE_SLEEP_ANFC tag was in SLEEP_A state before the automatic collision resolution started.

◆ nrf_nfct_tag_state_get()

NRF_STATIC_INLINE nrf_nfct_tag_state_t nrf_nfct_tag_state_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the NFC tag state.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
NRF_NFCT_TAG_STATE_DISABLEDNFC tag is disabled.
NRF_NFCT_TAG_STATE_RAMP_UPNFC tag is ramping up.
NRF_NFCT_TAG_STATE_IDLENFC tag is activated and idle.
NRF_NFCT_TAG_STATE_RECEIVENFC tag is receiving data.
NRF_NFCT_TAG_STATE_FRAME_DELAYFrame Delay Timer of the NFC tag is counting ticks since the last symbol of the last received frame.
NRF_NFCT_TAG_STATE_TRANSMITNFC tag is transmitting data.

◆ nrf_nfct_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_nfct_task_address_get ( NRF_NFCT_Type const *  p_reg,
nrf_nfct_task_t  task 
)

Function for returning the address of a specific NFCT task register.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask.
Returns
Task address.

◆ nrf_nfct_task_trigger()

NRF_STATIC_INLINE void nrf_nfct_task_trigger ( NRF_NFCT_Type *  p_reg,
nrf_nfct_task_t  task 
)

Function for activating a specific NFCT task.

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

◆ nrf_nfct_tx_bits_get()

NRF_STATIC_INLINE uint16_t nrf_nfct_tx_bits_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the length of the configured transmission frame.

Note
NFC frames do not have to consist of full bytes only, therefore data amount for transmission is configured in number of bits.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Number of bits to be sent excluding CRC, parity, SoF, and EoF.

◆ nrf_nfct_tx_bits_set()

NRF_STATIC_INLINE void nrf_nfct_tx_bits_set ( NRF_NFCT_Type *  p_reg,
uint16_t  tx_bits 
)

Function for setting up the NFC frame transmission.

Set the number of TX bits excluding CRC, parity, SoF, and EoF.

Note
Source of data for transmission is set by using nrf_nfct_rxtx_buffer_set.
NFC frames do not have to consist of full bytes only, therefore data amount for transmission is configured in number of bits.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]tx_bitsOverall number of bits to be sent.

◆ nrf_nfct_tx_frame_config_get()

NRF_STATIC_INLINE uint8_t nrf_nfct_tx_frame_config_get ( NRF_NFCT_Type const *  p_reg)

Function for getting the flags for NFC frame transmission configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
The flags of the NFCT frame transmission configuration, defined in nrf_nfct_tx_frame_config_t.

◆ nrf_nfct_tx_frame_config_set()

NRF_STATIC_INLINE void nrf_nfct_tx_frame_config_set ( NRF_NFCT_Type *  p_reg,
uint8_t  flags 
)

Function for setting up the flags of the NFC frame transmission configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]flagsFlags for NFCT TX configuration. Use nrf_nfct_tx_frame_config_t for setting.

Documentation feedback | Developer Zone | Subscribe | Updated