LibDriver MFRC522  1.0.0
MFRC522 full-featured driver
mfrc522 basic driver function

mfrc522 basic driver modules More...

Data Structures

struct  mfrc522_handle_s
 mfrc522 handle structure definition More...
 
struct  mfrc522_info_s
 mfrc522 information structure definition More...
 

Typedefs

typedef struct mfrc522_handle_s mfrc522_handle_t
 mfrc522 handle structure definition More...
 
typedef struct mfrc522_info_s mfrc522_info_t
 mfrc522 information structure definition More...
 

Enumerations

enum  mfrc522_interface_t { MFRC522_INTERFACE_IIC = 0x00 , MFRC522_INTERFACE_SPI = 0x01 , MFRC522_INTERFACE_UART = 0x02 }
 mfrc522 interface enumeration definition More...
 
enum  mfrc522_bool_t { MFRC522_BOOL_FALSE = 0x00 , MFRC522_BOOL_TRUE = 0x01 }
 mfrc522 bool enumeration definition More...
 
enum  mfrc522_command_t {
  MFRC522_COMMAND_IDLE = 0x00 , MFRC522_COMMAND_MEM = 0x01 , MFRC522_COMMAND_RANDOM_ID = 0x02 , MFRC522_COMMAND_CALC_CRC = 0x03 ,
  MFRC522_COMMAND_TRANSMIT = 0x04 , MFRC522_COMMAND_NO_CHANGE = 0x07 , MFRC522_COMMAND_RECEIVE = 0x08 , MFRC522_COMMAND_TRANSCEIVE = 0x0C ,
  MFRC522_COMMAND_MF_AUTHENT = 0x0E , MFRC522_COMMAND_SOFT_RESET = 0x0F
}
 mfrc522 command enumeration definition More...
 
enum  mfrc522_interrupt1_t {
  MFRC522_INTERRUPT1_TX = 6 , MFRC522_INTERRUPT1_RX = 5 , MFRC522_INTERRUPT1_IDLE = 4 , MFRC522_INTERRUPT1_HI_ALERT = 3 ,
  MFRC522_INTERRUPT1_LO_ALERT = 2 , MFRC522_INTERRUPT1_ERR = 1 , MFRC522_INTERRUPT1_TIMER = 0
}
 mfrc522 interrupt1 enumeration definition More...
 
enum  mfrc522_interrupt2_t { MFRC522_INTERRUPT2_MFIN_ACT = 4 , MFRC522_INTERRUPT2_CRC = 2 }
 mfrc522 interrupt2 enumeration definition More...
 
enum  mfrc522_interrupt_t {
  MFRC522_INTERRUPT_MFIN_ACT = MFRC522_INTERRUPT2_MFIN_ACT + 8 , MFRC522_INTERRUPT_CRC = MFRC522_INTERRUPT2_CRC + 8 , MFRC522_INTERRUPT_TX = MFRC522_INTERRUPT1_TX , MFRC522_INTERRUPT_RX = MFRC522_INTERRUPT1_RX ,
  MFRC522_INTERRUPT_IDLE = MFRC522_INTERRUPT1_IDLE , MFRC522_INTERRUPT_HI_ALERT = MFRC522_INTERRUPT1_HI_ALERT , MFRC522_INTERRUPT_LO_ALERT = MFRC522_INTERRUPT1_LO_ALERT , MFRC522_INTERRUPT_ERR = MFRC522_INTERRUPT1_ERR ,
  MFRC522_INTERRUPT_TIMER = MFRC522_INTERRUPT1_TIMER
}
 mfrc522 interrupt1 enumeration definition More...
 
enum  mfrc522_interrupt_pin_type_t { MFRC522_INTERRUPT_PIN_TYPE_STANDARD_CMOS = 1 , MFRC522_INTERRUPT_PIN_TYPE_OPEN_DRAIN = 0 }
 mfrc522 interrupt pin type enumeration definition More...
 
enum  mfrc522_interrupt_mark_t { MFRC522_INTERRUPT_MARK_SET = 1 , MFRC522_INTERRUPT_MARK_CLEARED = 0 }
 mfrc522 interrupt mark enumeration definition More...
 
enum  mfrc522_error_t {
  MFRC522_ERROR_WR = (1 << 7) , MFRC522_ERROR_TEMP = (1 << 6) , MFRC522_ERROR_BUFFER_OVER_FLOW = (1 << 4) , MFRC522_ERROR_COLL = (1 << 3) ,
  MFRC522_ERROR_CRC = (1 << 2) , MFRC522_ERROR_PARITY = (1 << 1) , MFRC522_ERROR_PROTOCOL = (1 << 0)
}
 mfrc522 error enumeration definition More...
 
enum  mfrc522_status1_t {
  MFRC522_STATUS1_CRC_OK = (1 << 6) , MFRC522_STATUS1_CRC_READY = (1 << 5) , MFRC522_STATUS1_IRQ = (1 << 4) , MFRC522_STATUS1_TRUNNING = (1 << 3) ,
  MFRC522_STATUS1_HI_ALERT = (1 << 1) , MFRC522_STATUS1_LO_ALERT = (1 << 0)
}
 mfrc522 status1 enumeration definition More...
 
enum  mfrc522_status2_t { MFRC522_STATUS2_MFCRYPTO1_ON = (1 << 3) }
 mfrc522 status2 enumeration definition More...
 
enum  mfrc522_modem_state_t {
  MFRC522_MODEM_STATE_IDLE = 0x00 , MFRC522_MODEM_STATE_WAIT_BIT_FRAMING = 0x01 , MFRC522_MODEM_STATE_TX_WAIT = 0x02 , MFRC522_MODEM_STATE_TRANSMITTING = 0x03 ,
  MFRC522_MODEM_STATE_RX_WAIT = 0x04 , MFRC522_MODEM_STATE_WAIT_DATA = 0x05 , MFRC522_MODEM_STATE_RECEIVING = 0x06
}
 mfrc522 modem state enumeration definition More...
 
enum  mfrc522_rx_align_t { MFRC522_RX_ALIGN_0 = 0 , MFRC522_RX_ALIGN_1 = 1 , MFRC522_RX_ALIGN_7 = 7 }
 mfrc522 rx align enumeration definition More...
 
enum  mfrc522_mfin_polarity_t { MFRC522_MFIN_POLARITY_LOW = 0 , MFRC522_MFIN_POLARITY_HIGH = 1 }
 mfrc522 mfin polarity enumeration definition More...
 
enum  mfrc522_crc_preset_t { MFRC522_CRC_PRESET_0000 = 0 , MFRC522_CRC_PRESET_6363 = 1 , MFRC522_CRC_PRESET_A671 = 2 , MFRC522_CRC_PRESET_FFFF = 3 }
 mfrc522 crc preset enumeration definition More...
 
enum  mfrc522_speed_t { MFRC522_SPEED_106_KBD = 0 , MFRC522_SPEED_212_KBD = 1 , MFRC522_SPEED_424_KBD = 2 , MFRC522_SPEED_848_KBD = 3 }
 mfrc522 speed enumeration definition More...
 
enum  mfrc522_antenna_driver_t {
  MFRC522_ANTENNA_DRIVER_INV_TX2_RF_ON = 7 , MFRC522_ANTENNA_DRIVER_INV_TX1_RF_ON = 6 , MFRC522_ANTENNA_DRIVER_INV_TX2_RF_OFF = 5 , MFRC522_ANTENNA_DRIVER_INV_TX1_RF_OFF = 4 ,
  MFRC522_ANTENNA_DRIVER_TX2_CW = 3 , MFRC522_ANTENNA_DRIVER_TX2_RF = 1 , MFRC522_ANTENNA_DRIVER_TX1_RF = 0
}
 mfrc522 antenna driver enumeration definition More...
 
enum  mfrc522_tx_input_t { MFRC522_TX_INPUT_3_STATE = 0 , MFRC522_TX_INPUT_INTERNAL_ENCODER = 1 , MFRC522_TX_INPUT_MFIN_PIN = 2 , MFRC522_TX_INPUT_CONTROL = 3 }
 mfrc522 tx input enumeration definition More...
 
enum  mfrc522_mfout_input_t {
  MFRC522_MFOUT_INPUT_3_STATE = 0 , MFRC522_MFOUT_INPUT_LOW = 1 , MFRC522_MFOUT_INPUT_HIGH = 2 , MFRC522_MFOUT_INPUT_TEST = 3 ,
  MFRC522_MFOUT_INPUT_INTERNAL_ENCODER = 4 , MFRC522_MFOUT_INPUT_TRANSMITTED = 5 , MFRC522_MFOUT_INPUT_RECEIVED = 7
}
 mfrc522 mfout input enumeration definition More...
 
enum  mfrc522_contactless_uart_input_t { MFRC522_CONTACTLESS_UART_INPUT_CONSTANT_LOW = 0 , MFRC522_CONTACTLESS_UART_MFIN_PIN = 1 , MFRC522_CONTACTLESS_UART_INTERNAL_ANALOG_MODULE = 2 , MFRC522_CONTACTLESS_UART_NRZ = 3 }
 mfrc522 contactless uart input enumeration definition More...
 
enum  mfrc522_channel_reception_t { MFRC522_CHANNEL_RECEPTION_STRONGER = 0 , MFRC522_CHANNEL_RECEPTION_STRONGER_FREEZE_SELECTED = 1 }
 mfrc522 channel reception enumeration definition More...
 
enum  mfrc522_rx_gain_t {
  MFRC522_RX_GAIN_18_DB = 2 , MFRC522_RX_GAIN_23_DB = 3 , MFRC522_RX_GAIN_33_DB = 4 , MFRC522_RX_GAIN_38_DB = 5 ,
  MFRC522_RX_GAIN_43_DB = 6 , MFRC522_RX_GAIN_48_DB = 7
}
 mfrc522 rx gain enumeration definition More...
 
enum  mfrc522_timer_gated_mode_t { MFRC522_TIMER_GATED_MODE_NONE = 0 , MFRC522_TIMER_GATED_MODE_MFIN = 1 , MFRC522_TIMER_GATED_MODE_AUX1 = 2 }
 mfrc522 timer gated mode enumeration definition More...
 
enum  mfrc522_test_analog_control_t {
  MFRC522_TEST_ANALOG_CONTROL_3_STATE = 0x0 , MFRC522_TEST_ANALOG_CONTROL_OUTPUT = 0x1 , MFRC522_TEST_ANALOG_CONTROL_TEST_SIGNAL_CORR1 = 0x2 , MFRC522_TEST_ANALOG_CONTROL_DAC_TEST_SIGNAL_MIN_LEVEL = 0x4 ,
  MFRC522_TEST_ANALOG_CONTROL_DAC_TEST_SIGNAL_ADC_I = 0x5 , MFRC522_TEST_ANALOG_CONTROL_DAC_TEST_SIGNAL_ADC_Q = 0x6 , MFRC522_TEST_ANALOG_CONTROL_SIGNAL_FOR_PRODUCTION = 0x8 , MFRC522_TEST_ANALOG_CONTROL_HIGH = 0xA ,
  MFRC522_TEST_ANALOG_CONTROL_LOW = 0xB , MFRC522_TEST_ANALOG_CONTROL_TX_ACTIVE = 0xC , MFRC522_TEST_ANALOG_CONTROL_RX_ACTIVE = 0xD , MFRC522_TEST_ANALOG_CONTROL_SUBCARRIER_DETECTED = 0xE ,
  MFRC522_TEST_ANALOG_CONTROL_DEFINED_BIT = 0xF
}
 mfrc522 test analog control enumeration definition More...
 

Functions

uint8_t mfrc522_info (mfrc522_info_t *info)
 get chip information More...
 
uint8_t mfrc522_set_interface (mfrc522_handle_t *handle, mfrc522_interface_t interface)
 set the chip interface More...
 
uint8_t mfrc522_get_interface (mfrc522_handle_t *handle, mfrc522_interface_t *interface)
 get the chip interface More...
 
uint8_t mfrc522_set_addr_pin (mfrc522_handle_t *handle, uint8_t addr_pin)
 set the iic address pin More...
 
uint8_t mfrc522_get_addr_pin (mfrc522_handle_t *handle, uint8_t *addr_pin)
 get the iic address pin More...
 
uint8_t mfrc522_irq_handler (mfrc522_handle_t *handle)
 irq handler More...
 
uint8_t mfrc522_init (mfrc522_handle_t *handle)
 initialize the chip More...
 
uint8_t mfrc522_deinit (mfrc522_handle_t *handle)
 close the chip More...
 
uint8_t mfrc522_transceiver (mfrc522_handle_t *handle, mfrc522_command_t command, uint8_t *in_buf, uint8_t in_len, uint8_t *out_buf, uint8_t *out_len, uint8_t *err, uint32_t ms)
 mfrc522 transceiver More...
 
uint8_t mfrc522_set_receiver_analog (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable the analog part of the receiver More...
 
uint8_t mfrc522_get_receiver_analog (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the analog part of the receiver status More...
 
uint8_t mfrc522_set_power_down (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable power down More...
 
uint8_t mfrc522_get_power_down (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get power down status More...
 
uint8_t mfrc522_set_command (mfrc522_handle_t *handle, mfrc522_command_t command)
 set the command More...
 
uint8_t mfrc522_get_command (mfrc522_handle_t *handle, mfrc522_command_t *command)
 get the command More...
 
uint8_t mfrc522_set_interrupt1 (mfrc522_handle_t *handle, mfrc522_interrupt1_t type, mfrc522_bool_t enable)
 enable or disable the interrupt1 More...
 
uint8_t mfrc522_get_interrupt1 (mfrc522_handle_t *handle, mfrc522_interrupt1_t type, mfrc522_bool_t *enable)
 get the interrupt1 status More...
 
uint8_t mfrc522_set_interrupt1_pin_invert (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable interrupt1 pin invert More...
 
uint8_t mfrc522_get_interrupt1_pin_invert (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the interrupt1 pin invert status More...
 
uint8_t mfrc522_set_interrupt1_mark (mfrc522_handle_t *handle, mfrc522_interrupt_mark_t mark)
 set the interrupt1 mark More...
 
uint8_t mfrc522_set_interrupt2 (mfrc522_handle_t *handle, mfrc522_interrupt2_t type, mfrc522_bool_t enable)
 enable or disable the interrupt2 More...
 
uint8_t mfrc522_get_interrupt2 (mfrc522_handle_t *handle, mfrc522_interrupt2_t type, mfrc522_bool_t *enable)
 get the interrupt2 status More...
 
uint8_t mfrc522_set_interrupt_pin_type (mfrc522_handle_t *handle, mfrc522_interrupt_pin_type_t type)
 set the interrupt pin type More...
 
uint8_t mfrc522_get_interrupt_pin_type (mfrc522_handle_t *handle, mfrc522_interrupt_pin_type_t *type)
 get the interrupt pin type More...
 
uint8_t mfrc522_set_interrupt2_mark (mfrc522_handle_t *handle, mfrc522_interrupt_mark_t mark)
 set the interrupt2 mark More...
 
uint8_t mfrc522_get_interrupt1_status (mfrc522_handle_t *handle, uint8_t *status)
 get the interrupt1 status More...
 
uint8_t mfrc522_get_interrupt2_status (mfrc522_handle_t *handle, uint8_t *status)
 get the interrupt2 status More...
 
uint8_t mfrc522_get_error (mfrc522_handle_t *handle, uint8_t *err)
 get the error More...
 
uint8_t mfrc522_get_status1 (mfrc522_handle_t *handle, uint8_t *status)
 get the status1 More...
 
uint8_t mfrc522_get_status2 (mfrc522_handle_t *handle, uint8_t *status)
 get the status2 More...
 
uint8_t mfrc522_get_modem_state (mfrc522_handle_t *handle, mfrc522_modem_state_t *state)
 get the modem state More...
 
uint8_t mfrc522_set_mifare_crypto1_on (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable mifare crypto1 on More...
 
uint8_t mfrc522_set_force_iic_high_speed (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable force iic high speed More...
 
uint8_t mfrc522_get_force_iic_high_speed (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the iic high speed status More...
 
uint8_t mfrc522_set_clear_temperature_error (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable clear temperature error More...
 
uint8_t mfrc522_get_clear_temperature_error (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the clear temperature error status More...
 
uint8_t mfrc522_set_fifo_data (mfrc522_handle_t *handle, uint8_t *data, uint8_t len)
 set the fifo data More...
 
uint8_t mfrc522_get_fifo_data (mfrc522_handle_t *handle, uint8_t *data, uint8_t len)
 get the fifo data More...
 
uint8_t mfrc522_get_fifo_level (mfrc522_handle_t *handle, uint8_t *level)
 get the fifo level More...
 
uint8_t mfrc522_flush_fifo (mfrc522_handle_t *handle)
 flush the fifo More...
 
uint8_t mfrc522_set_water_level (mfrc522_handle_t *handle, uint8_t level)
 set the water level More...
 
uint8_t mfrc522_get_water_level (mfrc522_handle_t *handle, uint8_t *level)
 get the water level More...
 
uint8_t mfrc522_stop_timer (mfrc522_handle_t *handle)
 stop the timer More...
 
uint8_t mfrc522_start_timer (mfrc522_handle_t *handle)
 start the timer More...
 
uint8_t mfrc522_get_rx_last_bits (mfrc522_handle_t *handle, uint8_t *bits)
 get the rx last bits More...
 
uint8_t mfrc522_start_send (mfrc522_handle_t *handle)
 start the transmission of data More...
 
uint8_t mfrc522_stop_send (mfrc522_handle_t *handle)
 stop the transmission of data More...
 
uint8_t mfrc522_set_tx_last_bits (mfrc522_handle_t *handle, uint8_t bits)
 set the tx last bits More...
 
uint8_t mfrc522_get_tx_last_bits (mfrc522_handle_t *handle, uint8_t *bits)
 get the tx last bits More...
 
uint8_t mfrc522_set_rx_align (mfrc522_handle_t *handle, mfrc522_rx_align_t align)
 set the rx align More...
 
uint8_t mfrc522_get_rx_align (mfrc522_handle_t *handle, mfrc522_rx_align_t *align)
 get the rx align More...
 
uint8_t mfrc522_set_value_clear_after_coll (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable value clear after coll More...
 
uint8_t mfrc522_get_value_clear_after_coll (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the value clear after coll status More...
 
uint8_t mfrc522_get_collision_position_not_valid (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the collision position not valid bit status More...
 
uint8_t mfrc522_get_collision_position (mfrc522_handle_t *handle, uint8_t *pos)
 get the collision position More...
 
uint8_t mfrc522_set_crc_msb_first (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable the crc msb first More...
 
uint8_t mfrc522_get_crc_msb_first (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the crc msb first More...
 
uint8_t mfrc522_set_tx_wait_rf (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable the rf tx wait More...
 
uint8_t mfrc522_get_tx_wait_rf (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the rf tx wait status More...
 
uint8_t mfrc522_set_mfin_polarity (mfrc522_handle_t *handle, mfrc522_mfin_polarity_t polarity)
 set the mfin polarity More...
 
uint8_t mfrc522_get_mfin_polarity (mfrc522_handle_t *handle, mfrc522_mfin_polarity_t *polarity)
 get the mfin polarity More...
 
uint8_t mfrc522_set_crc_preset (mfrc522_handle_t *handle, mfrc522_crc_preset_t preset)
 set the crc preset More...
 
uint8_t mfrc522_get_crc_preset (mfrc522_handle_t *handle, mfrc522_crc_preset_t *preset)
 get the crc preset More...
 
uint8_t mfrc522_set_tx_crc_generation (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable tx crc generation More...
 
uint8_t mfrc522_get_tx_crc_generation (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the tx crc generation status More...
 
uint8_t mfrc522_set_tx_speed (mfrc522_handle_t *handle, mfrc522_speed_t speed)
 set the tx speed More...
 
uint8_t mfrc522_get_tx_speed (mfrc522_handle_t *handle, mfrc522_speed_t *speed)
 get the tx speed More...
 
uint8_t mfrc522_set_modulation_invert (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable the modulation invert More...
 
uint8_t mfrc522_get_modulation_invert (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the modulation invert status More...
 
uint8_t mfrc522_set_rx_crc_generation (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable the rx crc generation More...
 
uint8_t mfrc522_get_rx_crc_generation (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the rx crc generation status More...
 
uint8_t mfrc522_set_rx_speed (mfrc522_handle_t *handle, mfrc522_speed_t speed)
 set the rx speed More...
 
uint8_t mfrc522_get_rx_speed (mfrc522_handle_t *handle, mfrc522_speed_t *speed)
 get the rx speed More...
 
uint8_t mfrc522_set_rx_no_error (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable rx no error More...
 
uint8_t mfrc522_get_rx_no_error (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the rx no error status More...
 
uint8_t mfrc522_set_rx_multiple (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable rx multiple More...
 
uint8_t mfrc522_get_rx_multiple (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the rx multiple status More...
 
uint8_t mfrc522_set_antenna_driver (mfrc522_handle_t *handle, mfrc522_antenna_driver_t driver, mfrc522_bool_t enable)
 enable or disable the antenna driver More...
 
uint8_t mfrc522_get_antenna_driver (mfrc522_handle_t *handle, mfrc522_antenna_driver_t driver, mfrc522_bool_t *enable)
 get the antenna driver status More...
 
uint8_t mfrc522_set_force_100_ask (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable force 100 ask More...
 
uint8_t mfrc522_get_force_100_ask (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the force 100 ask status More...
 
uint8_t mfrc522_set_tx_input (mfrc522_handle_t *handle, mfrc522_tx_input_t input)
 set the tx input More...
 
uint8_t mfrc522_get_tx_input (mfrc522_handle_t *handle, mfrc522_tx_input_t *input)
 get the tx input More...
 
uint8_t mfrc522_set_mfout_input (mfrc522_handle_t *handle, mfrc522_mfout_input_t input)
 set the mfout input More...
 
uint8_t mfrc522_get_mfout_input (mfrc522_handle_t *handle, mfrc522_mfout_input_t *input)
 get the mfout input More...
 
uint8_t mfrc522_set_contactless_uart_input (mfrc522_handle_t *handle, mfrc522_contactless_uart_input_t input)
 set the contactless uart input More...
 
uint8_t mfrc522_get_contactless_uart_input (mfrc522_handle_t *handle, mfrc522_contactless_uart_input_t *input)
 get the contactless uart input More...
 
uint8_t mfrc522_set_rx_wait (mfrc522_handle_t *handle, uint8_t t)
 set the rx wait More...
 
uint8_t mfrc522_get_rx_wait (mfrc522_handle_t *handle, uint8_t *t)
 get the rx wait More...
 
uint8_t mfrc522_set_min_level (mfrc522_handle_t *handle, uint8_t level)
 set the min level More...
 
uint8_t mfrc522_get_min_level (mfrc522_handle_t *handle, uint8_t *level)
 get the min level More...
 
uint8_t mfrc522_set_collision_level (mfrc522_handle_t *handle, uint8_t level)
 set the collision level More...
 
uint8_t mfrc522_get_collision_level (mfrc522_handle_t *handle, uint8_t *level)
 get the collision level More...
 
uint8_t mfrc522_set_channel_reception (mfrc522_handle_t *handle, mfrc522_channel_reception_t reception)
 set the channel reception More...
 
uint8_t mfrc522_get_channel_reception (mfrc522_handle_t *handle, mfrc522_channel_reception_t *reception)
 get the channel reception More...
 
uint8_t mfrc522_set_fix_iq (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable fix iq More...
 
uint8_t mfrc522_get_fix_iq (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the fix iq status More...
 
uint8_t mfrc522_set_timer_prescal_even (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable timer prescal even More...
 
uint8_t mfrc522_get_timer_prescal_even (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the timer prescal even status More...
 
uint8_t mfrc522_set_timer_constant_reception (mfrc522_handle_t *handle, uint8_t t)
 set the timer constant reception More...
 
uint8_t mfrc522_get_timer_constant_reception (mfrc522_handle_t *handle, uint8_t *t)
 get the timer constant reception More...
 
uint8_t mfrc522_set_timer_constant_sync (mfrc522_handle_t *handle, uint8_t t)
 set the timer constant sync More...
 
uint8_t mfrc522_get_timer_constant_sync (mfrc522_handle_t *handle, uint8_t *t)
 get the timer constant sync More...
 
uint8_t mfrc522_set_tx_wait (mfrc522_handle_t *handle, uint8_t t)
 set the tx wait More...
 
uint8_t mfrc522_get_tx_wait (mfrc522_handle_t *handle, uint8_t *t)
 get the tx wait More...
 
uint8_t mfrc522_set_parity_disable (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable parity disable More...
 
uint8_t mfrc522_get_parity_disable (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the parity disable status More...
 
uint8_t mfrc522_set_serial_speed (mfrc522_handle_t *handle, uint8_t t0, uint8_t t1)
 set the serial speed More...
 
uint8_t mfrc522_get_serial_speed (mfrc522_handle_t *handle, uint8_t *t0, uint8_t *t1)
 get the serial speed More...
 
uint8_t mfrc522_get_crc (mfrc522_handle_t *handle, uint16_t *crc)
 get the crc More...
 
uint8_t mfrc522_set_modulation_width (mfrc522_handle_t *handle, uint8_t width)
 set the modulation width More...
 
uint8_t mfrc522_get_modulation_width (mfrc522_handle_t *handle, uint8_t *width)
 get the modulation width More...
 
uint8_t mfrc522_set_rx_gain (mfrc522_handle_t *handle, mfrc522_rx_gain_t gain)
 set the rx gain More...
 
uint8_t mfrc522_get_rx_gain (mfrc522_handle_t *handle, mfrc522_rx_gain_t *gain)
 get the rx gain More...
 
uint8_t mfrc522_set_cwgsn (mfrc522_handle_t *handle, uint8_t n)
 set the cwgsn More...
 
uint8_t mfrc522_get_cwgsn (mfrc522_handle_t *handle, uint8_t *n)
 get the cwgsn More...
 
uint8_t mfrc522_set_modgsn (mfrc522_handle_t *handle, uint8_t n)
 set the modgsn More...
 
uint8_t mfrc522_get_modgsn (mfrc522_handle_t *handle, uint8_t *n)
 get the modgsn More...
 
uint8_t mfrc522_set_cwgsp (mfrc522_handle_t *handle, uint8_t n)
 set the cwgsp More...
 
uint8_t mfrc522_get_cwgsp (mfrc522_handle_t *handle, uint8_t *n)
 get the cwgsp More...
 
uint8_t mfrc522_set_modgsp (mfrc522_handle_t *handle, uint8_t n)
 set the modgsp More...
 
uint8_t mfrc522_get_modgsp (mfrc522_handle_t *handle, uint8_t *n)
 get the modgsp More...
 
uint8_t mfrc522_set_timer_auto (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable timer auto More...
 
uint8_t mfrc522_get_timer_auto (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the timer auto status More...
 
uint8_t mfrc522_set_timer_gated_mode (mfrc522_handle_t *handle, mfrc522_timer_gated_mode_t mode)
 set the timer gated mode More...
 
uint8_t mfrc522_get_timer_gated_mode (mfrc522_handle_t *handle, mfrc522_timer_gated_mode_t *mode)
 get the timer gated mode More...
 
uint8_t mfrc522_set_timer_auto_restart (mfrc522_handle_t *handle, mfrc522_bool_t enable)
 enable or disable timer auto restart More...
 
uint8_t mfrc522_get_timer_auto_restart (mfrc522_handle_t *handle, mfrc522_bool_t *enable)
 get the timer auto restart status More...
 
uint8_t mfrc522_set_timer_prescaler (mfrc522_handle_t *handle, uint16_t t)
 set the timer prescaler More...
 
uint8_t mfrc522_get_timer_prescaler (mfrc522_handle_t *handle, uint16_t *t)
 get the timer prescaler More...
 
uint8_t mfrc522_set_timer_reload (mfrc522_handle_t *handle, uint16_t reload)
 set the timer reload More...
 
uint8_t mfrc522_get_timer_reload (mfrc522_handle_t *handle, uint16_t *reload)
 get the timer reload More...
 
uint8_t mfrc522_get_timer_counter (mfrc522_handle_t *handle, uint16_t *cnt)
 get the timer counter More...
 

Detailed Description

mfrc522 basic driver modules

Typedef Documentation

◆ mfrc522_handle_t

mfrc522 handle structure definition

◆ mfrc522_info_t

mfrc522 information structure definition

Enumeration Type Documentation

◆ mfrc522_antenna_driver_t

mfrc522 antenna driver enumeration definition

Enumerator
MFRC522_ANTENNA_DRIVER_INV_TX2_RF_ON 

output signal on pin tx2 inverted when driver tx2 is enabled

MFRC522_ANTENNA_DRIVER_INV_TX1_RF_ON 

output signal on pin tx1 inverted when driver tx1 is enabled

MFRC522_ANTENNA_DRIVER_INV_TX2_RF_OFF 

output signal on pin tx2 inverted when driver tx2 is disabled

MFRC522_ANTENNA_DRIVER_INV_TX1_RF_OFF 

output signal on pin tx1 inverted when driver tx1 is disabled

MFRC522_ANTENNA_DRIVER_TX2_CW 

output signal on pin tx2 continuously delivers the unmodulated 13.56 MHz energy carrier tx2cw bit is enabled to modulate the 13.56 MHz energy carrier

MFRC522_ANTENNA_DRIVER_TX2_RF 

output signal on pin tx2 delivers the 13.56 MHz energy carrier modulated by the transmission data

MFRC522_ANTENNA_DRIVER_TX1_RF 

output signal on pin tx1 delivers the 13.56 MHz energy carrier modulated by the transmission data

Definition at line 250 of file driver_mfrc522.h.

◆ mfrc522_bool_t

mfrc522 bool enumeration definition

Enumerator
MFRC522_BOOL_FALSE 

disable function

MFRC522_BOOL_TRUE 

enable function

Definition at line 72 of file driver_mfrc522.h.

◆ mfrc522_channel_reception_t

mfrc522 channel reception enumeration definition

Enumerator
MFRC522_CHANNEL_RECEPTION_STRONGER 

selects the stronger channel

MFRC522_CHANNEL_RECEPTION_STRONGER_FREEZE_SELECTED 

selects the stronger channel and freezes the selected channel during communication

Definition at line 307 of file driver_mfrc522.h.

◆ mfrc522_command_t

mfrc522 command enumeration definition

Enumerator
MFRC522_COMMAND_IDLE 

no action, cancels current command execution

MFRC522_COMMAND_MEM 

stores 25 bytes into the internal buffer

MFRC522_COMMAND_RANDOM_ID 

generates a 10-byte random id number

MFRC522_COMMAND_CALC_CRC 

activates the crc coprocessor or performs a self test

MFRC522_COMMAND_TRANSMIT 

transmits data from the fifo buffer

MFRC522_COMMAND_NO_CHANGE 

no command change

MFRC522_COMMAND_RECEIVE 

activates the receiver circuits

MFRC522_COMMAND_TRANSCEIVE 

transmits data from fifo buffer to antenna and automatically activates the receiver after transmission

MFRC522_COMMAND_MF_AUTHENT 

performs the MIFARE standard authentication as a reader

MFRC522_COMMAND_SOFT_RESET 

resets the chip

Definition at line 81 of file driver_mfrc522.h.

◆ mfrc522_contactless_uart_input_t

mfrc522 contactless uart input enumeration definition

Enumerator
MFRC522_CONTACTLESS_UART_INPUT_CONSTANT_LOW 

constant low

MFRC522_CONTACTLESS_UART_MFIN_PIN 

manchester with subcarrier from pin mfin

MFRC522_CONTACTLESS_UART_INTERNAL_ANALOG_MODULE 

modulated signal from the internal analog module

MFRC522_CONTACTLESS_UART_NRZ 

NRZ coding without subcarrier from pin MFIN which is only valid for transfer speeds above 106 kBd

Definition at line 295 of file driver_mfrc522.h.

◆ mfrc522_crc_preset_t

mfrc522 crc preset enumeration definition

Enumerator
MFRC522_CRC_PRESET_0000 

0000h

MFRC522_CRC_PRESET_6363 

6363h

MFRC522_CRC_PRESET_A671 

A671h

MFRC522_CRC_PRESET_FFFF 

FFFFh

Definition at line 228 of file driver_mfrc522.h.

◆ mfrc522_error_t

mfrc522 error enumeration definition

Enumerator
MFRC522_ERROR_WR 

write error

MFRC522_ERROR_TEMP 

overheating

MFRC522_ERROR_BUFFER_OVER_FLOW 

buffer is full

MFRC522_ERROR_COLL 

a bit collision is detected

MFRC522_ERROR_CRC 

crc calculation fails

MFRC522_ERROR_PARITY 

parity check failed

MFRC522_ERROR_PROTOCOL 

sof is incorrect

Definition at line 156 of file driver_mfrc522.h.

◆ mfrc522_interface_t

mfrc522 interface enumeration definition

Enumerator
MFRC522_INTERFACE_IIC 

iic interface

MFRC522_INTERFACE_SPI 

spi interface

MFRC522_INTERFACE_UART 

uart interface

Definition at line 62 of file driver_mfrc522.h.

◆ mfrc522_interrupt1_t

mfrc522 interrupt1 enumeration definition

Enumerator
MFRC522_INTERRUPT1_TX 

allows the transmitter interrupt request to be propagated to pin irq

MFRC522_INTERRUPT1_RX 

allows the receiver interrupt request to be propagated to pin irq

MFRC522_INTERRUPT1_IDLE 

allows the idle interrupt request to be propagated to pin irq

MFRC522_INTERRUPT1_HI_ALERT 

allows the high alert interrupt request to be propagated to pin irq

MFRC522_INTERRUPT1_LO_ALERT 

allows the low alert interrupt request to be propagated to pin irq

MFRC522_INTERRUPT1_ERR 

allows the error interrupt request to be propagated to pin irq

MFRC522_INTERRUPT1_TIMER 

allows the timer interrupt request to be propagated to pin irq

Definition at line 99 of file driver_mfrc522.h.

◆ mfrc522_interrupt2_t

mfrc522 interrupt2 enumeration definition

Enumerator
MFRC522_INTERRUPT2_MFIN_ACT 

allows the MFIN active interrupt request to be propagated to pin irq

MFRC522_INTERRUPT2_CRC 

allows the CRC interrupt request to be propagated to pin irq

Definition at line 113 of file driver_mfrc522.h.

◆ mfrc522_interrupt_mark_t

mfrc522 interrupt mark enumeration definition

Enumerator
MFRC522_INTERRUPT_MARK_SET 

marked 1

MFRC522_INTERRUPT_MARK_CLEARED 

marked 0

Definition at line 147 of file driver_mfrc522.h.

◆ mfrc522_interrupt_pin_type_t

mfrc522 interrupt pin type enumeration definition

Enumerator
MFRC522_INTERRUPT_PIN_TYPE_STANDARD_CMOS 

standard cmos output pin

MFRC522_INTERRUPT_PIN_TYPE_OPEN_DRAIN 

open drain output pin

Definition at line 138 of file driver_mfrc522.h.

◆ mfrc522_interrupt_t

mfrc522 interrupt1 enumeration definition

Enumerator
MFRC522_INTERRUPT_MFIN_ACT 

allows the MFIN active interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_CRC 

allows the CRC interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_TX 

allows the transmitter interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_RX 

allows the receiver interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_IDLE 

allows the idle interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_HI_ALERT 

allows the high alert interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_LO_ALERT 

allows the low alert interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_ERR 

allows the error interrupt request to be propagated to pin irq

MFRC522_INTERRUPT_TIMER 

allows the timer interrupt request to be propagated to pin irq

Definition at line 122 of file driver_mfrc522.h.

◆ mfrc522_mfin_polarity_t

mfrc522 mfin polarity enumeration definition

Enumerator
MFRC522_MFIN_POLARITY_LOW 

polarity of pin mfin is active low

MFRC522_MFIN_POLARITY_HIGH 

polarity of pin mfin is active high

Definition at line 219 of file driver_mfrc522.h.

◆ mfrc522_mfout_input_t

mfrc522 mfout input enumeration definition

Enumerator
MFRC522_MFOUT_INPUT_3_STATE 

3 state

MFRC522_MFOUT_INPUT_LOW 

low

MFRC522_MFOUT_INPUT_HIGH 

high

MFRC522_MFOUT_INPUT_TEST 

test bus signal as defined by the testsel1reg register’s tstbusbitsel[2:0] value

MFRC522_MFOUT_INPUT_INTERNAL_ENCODER 

modulation signal (envelope) from the internal encoder, miller pulse encoded

MFRC522_MFOUT_INPUT_TRANSMITTED 

serial data stream to be transmitted, data stream before miller encoder

MFRC522_MFOUT_INPUT_RECEIVED 

serial data stream received, data stream after manchester decoder

Definition at line 281 of file driver_mfrc522.h.

◆ mfrc522_modem_state_t

mfrc522 modem state enumeration definition

Enumerator
MFRC522_MODEM_STATE_IDLE 

idle

MFRC522_MODEM_STATE_WAIT_BIT_FRAMING 

wait for the start send bit

MFRC522_MODEM_STATE_TX_WAIT 

wait until rf field is present

MFRC522_MODEM_STATE_TRANSMITTING 

transmitting

MFRC522_MODEM_STATE_RX_WAIT 

wait until rf field is present

MFRC522_MODEM_STATE_WAIT_DATA 

wait for data

MFRC522_MODEM_STATE_RECEIVING 

receiving

Definition at line 191 of file driver_mfrc522.h.

◆ mfrc522_rx_align_t

mfrc522 rx align enumeration definition

Enumerator
MFRC522_RX_ALIGN_0 

lsb of the received bit is stored at bit position 0, the second received bit is stored at bit position 1

MFRC522_RX_ALIGN_1 

lsb of the received bit is stored at bit position 1, the second received bit is stored at bit position 2

MFRC522_RX_ALIGN_7 

lsb of the received bit is stored at bit position 7, the second received bit is stored in the next byte that follows at bit position 0

Definition at line 205 of file driver_mfrc522.h.

◆ mfrc522_rx_gain_t

mfrc522 rx gain enumeration definition

Enumerator
MFRC522_RX_GAIN_18_DB 

18 dB

MFRC522_RX_GAIN_23_DB 

23 dB

MFRC522_RX_GAIN_33_DB 

33 dB

MFRC522_RX_GAIN_38_DB 

38 dB

MFRC522_RX_GAIN_43_DB 

43 dB

MFRC522_RX_GAIN_48_DB 

48 dB

Definition at line 317 of file driver_mfrc522.h.

◆ mfrc522_speed_t

mfrc522 speed enumeration definition

Enumerator
MFRC522_SPEED_106_KBD 

106 kBd

MFRC522_SPEED_212_KBD 

212 kBd

MFRC522_SPEED_424_KBD 

424 kBd

MFRC522_SPEED_848_KBD 

848 kBd

Definition at line 239 of file driver_mfrc522.h.

◆ mfrc522_status1_t

mfrc522 status1 enumeration definition

Enumerator
MFRC522_STATUS1_CRC_OK 

crc is ok

MFRC522_STATUS1_CRC_READY 

the crc calculation has finished

MFRC522_STATUS1_IRQ 

irq

MFRC522_STATUS1_TRUNNING 

timer unit is running

MFRC522_STATUS1_HI_ALERT 

hi alert = (64 – fifo length) <= water level

MFRC522_STATUS1_LO_ALERT 

lo alert = fifo length <= water level

Definition at line 170 of file driver_mfrc522.h.

◆ mfrc522_status2_t

mfrc522 status2 enumeration definition

Enumerator
MFRC522_STATUS2_MFCRYPTO1_ON 

indicates that the mifare crypto1 unit is switched on

Definition at line 183 of file driver_mfrc522.h.

◆ mfrc522_test_analog_control_t

mfrc522 test analog control enumeration definition

Enumerator
MFRC522_TEST_ANALOG_CONTROL_3_STATE 

3 state

MFRC522_TEST_ANALOG_CONTROL_OUTPUT 

output of test dac1, output of test dac2

MFRC522_TEST_ANALOG_CONTROL_TEST_SIGNAL_CORR1 

test signal corr1

MFRC522_TEST_ANALOG_CONTROL_DAC_TEST_SIGNAL_MIN_LEVEL 

dac test signal min level

MFRC522_TEST_ANALOG_CONTROL_DAC_TEST_SIGNAL_ADC_I 

dac test signal adc i

MFRC522_TEST_ANALOG_CONTROL_DAC_TEST_SIGNAL_ADC_Q 

dac test signal adc q

MFRC522_TEST_ANALOG_CONTROL_SIGNAL_FOR_PRODUCTION 

test signal for production

MFRC522_TEST_ANALOG_CONTROL_HIGH 

high

MFRC522_TEST_ANALOG_CONTROL_LOW 

low

MFRC522_TEST_ANALOG_CONTROL_TX_ACTIVE 

tx active

MFRC522_TEST_ANALOG_CONTROL_RX_ACTIVE 

rx active

MFRC522_TEST_ANALOG_CONTROL_SUBCARRIER_DETECTED 

subcarrier detected

MFRC522_TEST_ANALOG_CONTROL_DEFINED_BIT 

test bus bit as defined by the testsel1reg register’s tstbusbitsel[2:0] bits

Definition at line 340 of file driver_mfrc522.h.

◆ mfrc522_timer_gated_mode_t

mfrc522 timer gated mode enumeration definition

Enumerator
MFRC522_TIMER_GATED_MODE_NONE 

non gated mode

MFRC522_TIMER_GATED_MODE_MFIN 

gated by pin MFIN

MFRC522_TIMER_GATED_MODE_AUX1 

gated by pin AUX1

Definition at line 330 of file driver_mfrc522.h.

◆ mfrc522_tx_input_t

mfrc522 tx input enumeration definition

Enumerator
MFRC522_TX_INPUT_3_STATE 

3 state, in soft power-down the drivers are only in 3-state mode if the DriverSel[1:0] value is set to 3-state mode

MFRC522_TX_INPUT_INTERNAL_ENCODER 

modulation signal (envelope) from the internal encoder, miller pulse encoded

MFRC522_TX_INPUT_MFIN_PIN 

modulation signal (envelope) from pin mfin

MFRC522_TX_INPUT_CONTROL 

HIGH, the HIGH level depends on the setting of bits InvTx1RFOn/InvTx1RFOff and InvTx2RFOn/InvTx2RFOff

Definition at line 267 of file driver_mfrc522.h.

Function Documentation

◆ mfrc522_deinit()

uint8_t mfrc522_deinit ( mfrc522_handle_t handle)

close the chip

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 iic, spi or uart deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 interface is invalid
  • 5 power down failed
Note
none

Definition at line 627 of file driver_mfrc522.c.

◆ mfrc522_flush_fifo()

uint8_t mfrc522_flush_fifo ( mfrc522_handle_t handle)

flush the fifo

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 flush fifo failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2449 of file driver_mfrc522.c.

◆ mfrc522_get_addr_pin()

uint8_t mfrc522_get_addr_pin ( mfrc522_handle_t handle,
uint8_t *  addr_pin 
)

get the iic address pin

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*addr_pinpointer to an address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 323 of file driver_mfrc522.c.

◆ mfrc522_get_antenna_driver()

uint8_t mfrc522_get_antenna_driver ( mfrc522_handle_t handle,
mfrc522_antenna_driver_t  driver,
mfrc522_bool_t enable 
)

get the antenna driver status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]driverantenna driver type
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get antenna driver failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4057 of file driver_mfrc522.c.

◆ mfrc522_get_channel_reception()

uint8_t mfrc522_get_channel_reception ( mfrc522_handle_t handle,
mfrc522_channel_reception_t reception 
)

get the channel reception

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*receptionpointer to a channel reception buffer
Returns
status code
  • 0 success
  • 1 get channel reception failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4734 of file driver_mfrc522.c.

◆ mfrc522_get_clear_temperature_error()

uint8_t mfrc522_get_clear_temperature_error ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the clear temperature error status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get clear temperature error failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2284 of file driver_mfrc522.c.

◆ mfrc522_get_collision_level()

uint8_t mfrc522_get_collision_level ( mfrc522_handle_t handle,
uint8_t *  level 
)

get the collision level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*levelpointer to a collision level buffer
Returns
status code
  • 0 success
  • 1 get collision level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4652 of file driver_mfrc522.c.

◆ mfrc522_get_collision_position()

uint8_t mfrc522_get_collision_position ( mfrc522_handle_t handle,
uint8_t *  pos 
)

get the collision position

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*pospointer to a position buffer
Returns
status code
  • 0 success
  • 1 get collision position failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3071 of file driver_mfrc522.c.

◆ mfrc522_get_collision_position_not_valid()

uint8_t mfrc522_get_collision_position_not_valid ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the collision position not valid bit status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get collision position not valid failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3034 of file driver_mfrc522.c.

◆ mfrc522_get_command()

uint8_t mfrc522_get_command ( mfrc522_handle_t handle,
mfrc522_command_t command 
)

get the command

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*commandpointer to a set command buffer
Returns
status code
  • 0 success
  • 1 get command failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1431 of file driver_mfrc522.c.

◆ mfrc522_get_contactless_uart_input()

uint8_t mfrc522_get_contactless_uart_input ( mfrc522_handle_t handle,
mfrc522_contactless_uart_input_t input 
)

get the contactless uart input

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*inputpointer to a contactless uart input buffer
Returns
status code
  • 0 success
  • 1 get contactless uart input failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4385 of file driver_mfrc522.c.

◆ mfrc522_get_crc()

uint8_t mfrc522_get_crc ( mfrc522_handle_t handle,
uint16_t *  crc 
)

get the crc

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*crcpointer to a crc buffer
Returns
status code
  • 0 success
  • 1 get crc failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5394 of file driver_mfrc522.c.

◆ mfrc522_get_crc_msb_first()

uint8_t mfrc522_get_crc_msb_first ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the crc msb first

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get crc msb first failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3153 of file driver_mfrc522.c.

◆ mfrc522_get_crc_preset()

uint8_t mfrc522_get_crc_preset ( mfrc522_handle_t handle,
mfrc522_crc_preset_t preset 
)

get the crc preset

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*presetpointer to a crc preset buffer
Returns
status code
  • 0 success
  • 1 get crc preset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3399 of file driver_mfrc522.c.

◆ mfrc522_get_cwgsn()

uint8_t mfrc522_get_cwgsn ( mfrc522_handle_t handle,
uint8_t *  n 
)

get the cwgsn

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*npointer to a param buffer
Returns
status code
  • 0 success
  • 1 get cwgsn failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5635 of file driver_mfrc522.c.

◆ mfrc522_get_cwgsp()

uint8_t mfrc522_get_cwgsp ( mfrc522_handle_t handle,
uint8_t *  n 
)

get the cwgsp

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*npointer to a param buffer
Returns
status code
  • 0 success
  • 1 get cwgsp failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5813 of file driver_mfrc522.c.

◆ mfrc522_get_error()

uint8_t mfrc522_get_error ( mfrc522_handle_t handle,
uint8_t *  err 
)

get the error

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*errpointer to an error buffer
Returns
status code
  • 0 success
  • 1 get error failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1964 of file driver_mfrc522.c.

◆ mfrc522_get_fifo_data()

uint8_t mfrc522_get_fifo_data ( mfrc522_handle_t handle,
uint8_t *  data,
uint8_t  len 
)

get the fifo data

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 get fifo data failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 64
Note
len <= 64

Definition at line 2370 of file driver_mfrc522.c.

◆ mfrc522_get_fifo_level()

uint8_t mfrc522_get_fifo_level ( mfrc522_handle_t handle,
uint8_t *  level 
)

get the fifo level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*levelpointer to a level buffer
Returns
status code
  • 0 success
  • 1 get fifo level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2415 of file driver_mfrc522.c.

◆ mfrc522_get_fix_iq()

uint8_t mfrc522_get_fix_iq ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the fix iq status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get fix iq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4816 of file driver_mfrc522.c.

◆ mfrc522_get_force_100_ask()

uint8_t mfrc522_get_force_100_ask ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the force 100 ask status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get force 100 ask failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4139 of file driver_mfrc522.c.

◆ mfrc522_get_force_iic_high_speed()

uint8_t mfrc522_get_force_iic_high_speed ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the iic high speed status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get force iic high speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2202 of file driver_mfrc522.c.

◆ mfrc522_get_interface()

uint8_t mfrc522_get_interface ( mfrc522_handle_t handle,
mfrc522_interface_t interface 
)

get the chip interface

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*interfacepointer to a chip interface buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 281 of file driver_mfrc522.c.

◆ mfrc522_get_interrupt1()

uint8_t mfrc522_get_interrupt1 ( mfrc522_handle_t handle,
mfrc522_interrupt1_t  type,
mfrc522_bool_t enable 
)

get the interrupt1 status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]typeinterrupt1 type
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt1 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1515 of file driver_mfrc522.c.

◆ mfrc522_get_interrupt1_pin_invert()

uint8_t mfrc522_get_interrupt1_pin_invert ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the interrupt1 pin invert status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt1 pin invert failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1597 of file driver_mfrc522.c.

◆ mfrc522_get_interrupt1_status()

uint8_t mfrc522_get_interrupt1_status ( mfrc522_handle_t handle,
uint8_t *  status 
)

get the interrupt1 status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get interrupt1 status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1890 of file driver_mfrc522.c.

◆ mfrc522_get_interrupt2()

uint8_t mfrc522_get_interrupt2 ( mfrc522_handle_t handle,
mfrc522_interrupt2_t  type,
mfrc522_bool_t enable 
)

get the interrupt2 status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]typeinterrupt2 type
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1726 of file driver_mfrc522.c.

◆ mfrc522_get_interrupt2_status()

uint8_t mfrc522_get_interrupt2_status ( mfrc522_handle_t handle,
uint8_t *  status 
)

get the interrupt2 status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get interrupt2 status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1927 of file driver_mfrc522.c.

◆ mfrc522_get_interrupt_pin_type()

uint8_t mfrc522_get_interrupt_pin_type ( mfrc522_handle_t handle,
mfrc522_interrupt_pin_type_t type 
)

get the interrupt pin type

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*typepointer to an interrupt pin type buffer
Returns
status code
  • 0 success
  • 1 get interrupt pin type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1808 of file driver_mfrc522.c.

◆ mfrc522_get_mfin_polarity()

uint8_t mfrc522_get_mfin_polarity ( mfrc522_handle_t handle,
mfrc522_mfin_polarity_t polarity 
)

get the mfin polarity

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*polaritypointer to a mfin polarity buffer
Returns
status code
  • 0 success
  • 1 get mfin polarity failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3317 of file driver_mfrc522.c.

◆ mfrc522_get_mfout_input()

uint8_t mfrc522_get_mfout_input ( mfrc522_handle_t handle,
mfrc522_mfout_input_t input 
)

get the mfout input

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*inputpointer to a mfout input buffer
Returns
status code
  • 0 success
  • 1 get mfout input failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4303 of file driver_mfrc522.c.

◆ mfrc522_get_min_level()

uint8_t mfrc522_get_min_level ( mfrc522_handle_t handle,
uint8_t *  level 
)

get the min level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*levelpointer to a min level buffer
Returns
status code
  • 0 success
  • 1 get min level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4563 of file driver_mfrc522.c.

◆ mfrc522_get_modem_state()

uint8_t mfrc522_get_modem_state ( mfrc522_handle_t handle,
mfrc522_modem_state_t state 
)

get the modem state

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*statepointer to a modem state buffer
Returns
status code
  • 0 success
  • 1 get modem state failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2075 of file driver_mfrc522.c.

◆ mfrc522_get_modgsn()

uint8_t mfrc522_get_modgsn ( mfrc522_handle_t handle,
uint8_t *  n 
)

get the modgsn

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*npointer to a param buffer
Returns
status code
  • 0 success
  • 1 get modgsn failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5724 of file driver_mfrc522.c.

◆ mfrc522_get_modgsp()

uint8_t mfrc522_get_modgsp ( mfrc522_handle_t handle,
uint8_t *  n 
)

get the modgsp

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*npointer to a param buffer
Returns
status code
  • 0 success
  • 1 get modgsp failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5902 of file driver_mfrc522.c.

◆ mfrc522_get_modulation_invert()

uint8_t mfrc522_get_modulation_invert ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the modulation invert status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get modulation invert failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3645 of file driver_mfrc522.c.

◆ mfrc522_get_modulation_width()

uint8_t mfrc522_get_modulation_width ( mfrc522_handle_t handle,
uint8_t *  width 
)

get the modulation width

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*widthpointer to a modulation width buffer
Returns
status code
  • 0 success
  • 1 get modulation width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5466 of file driver_mfrc522.c.

◆ mfrc522_get_parity_disable()

uint8_t mfrc522_get_parity_disable ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the parity disable status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get parity disable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5247 of file driver_mfrc522.c.

◆ mfrc522_get_power_down()

uint8_t mfrc522_get_power_down ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get power down status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get power down failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1349 of file driver_mfrc522.c.

◆ mfrc522_get_receiver_analog()

uint8_t mfrc522_get_receiver_analog ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the analog part of the receiver status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get receiver analog failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1267 of file driver_mfrc522.c.

◆ mfrc522_get_rx_align()

uint8_t mfrc522_get_rx_align ( mfrc522_handle_t handle,
mfrc522_rx_align_t align 
)

get the rx align

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*alignpointer to a rx align buffer
Returns
status code
  • 0 success
  • 1 get rx align failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2915 of file driver_mfrc522.c.

◆ mfrc522_get_rx_crc_generation()

uint8_t mfrc522_get_rx_crc_generation ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the rx crc generation status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get rx crc generation failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3727 of file driver_mfrc522.c.

◆ mfrc522_get_rx_gain()

uint8_t mfrc522_get_rx_gain ( mfrc522_handle_t handle,
mfrc522_rx_gain_t gain 
)

get the rx gain

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*gainpointer to an rx gain buffer
Returns
status code
  • 0 success
  • 1 get rx gain failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5546 of file driver_mfrc522.c.

◆ mfrc522_get_rx_last_bits()

uint8_t mfrc522_get_rx_last_bits ( mfrc522_handle_t handle,
uint8_t *  bits 
)

get the rx last bits

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*bitspointer to a bits buffer
Returns
status code
  • 0 success
  • 1 get rx last bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2657 of file driver_mfrc522.c.

◆ mfrc522_get_rx_multiple()

uint8_t mfrc522_get_rx_multiple ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the rx multiple status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get rx multiple failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3973 of file driver_mfrc522.c.

◆ mfrc522_get_rx_no_error()

uint8_t mfrc522_get_rx_no_error ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the rx no error status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get rx no error failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3891 of file driver_mfrc522.c.

◆ mfrc522_get_rx_speed()

uint8_t mfrc522_get_rx_speed ( mfrc522_handle_t handle,
mfrc522_speed_t speed 
)

get the rx speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*speedpointer to an rx speed buffer
Returns
status code
  • 0 success
  • 1 get rx speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3809 of file driver_mfrc522.c.

◆ mfrc522_get_rx_wait()

uint8_t mfrc522_get_rx_wait ( mfrc522_handle_t handle,
uint8_t *  t 
)

get the rx wait

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*tpointer to an rx wait buffer
Returns
status code
  • 0 success
  • 1 get rx wait failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4474 of file driver_mfrc522.c.

◆ mfrc522_get_serial_speed()

uint8_t mfrc522_get_serial_speed ( mfrc522_handle_t handle,
uint8_t *  t0,
uint8_t *  t1 
)

get the serial speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*t0pointer to a speed parm0 buffer
[out]*t1pointer to a speed parm1 buffer
Returns
status code
  • 0 success
  • 1 get serial speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5356 of file driver_mfrc522.c.

◆ mfrc522_get_status1()

uint8_t mfrc522_get_status1 ( mfrc522_handle_t handle,
uint8_t *  status 
)

get the status1

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status1 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2001 of file driver_mfrc522.c.

◆ mfrc522_get_status2()

uint8_t mfrc522_get_status2 ( mfrc522_handle_t handle,
uint8_t *  status 
)

get the status2

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2038 of file driver_mfrc522.c.

◆ mfrc522_get_timer_auto()

uint8_t mfrc522_get_timer_auto ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the timer auto status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer auto failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5984 of file driver_mfrc522.c.

◆ mfrc522_get_timer_auto_restart()

uint8_t mfrc522_get_timer_auto_restart ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the timer auto restart status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer auto restart failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6148 of file driver_mfrc522.c.

◆ mfrc522_get_timer_constant_reception()

uint8_t mfrc522_get_timer_constant_reception ( mfrc522_handle_t handle,
uint8_t *  t 
)

get the timer constant reception

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*tpointer to a reception buffer
Returns
status code
  • 0 success
  • 1 get timer constant reception failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4987 of file driver_mfrc522.c.

◆ mfrc522_get_timer_constant_sync()

uint8_t mfrc522_get_timer_constant_sync ( mfrc522_handle_t handle,
uint8_t *  t 
)

get the timer constant sync

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*tpointer to a sync buffer
Returns
status code
  • 0 success
  • 1 get timer constant sync failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5076 of file driver_mfrc522.c.

◆ mfrc522_get_timer_counter()

uint8_t mfrc522_get_timer_counter ( mfrc522_handle_t handle,
uint16_t *  cnt 
)

get the timer counter

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*cntpointer to a counter buffer
Returns
status code
  • 0 success
  • 1 get timer counter failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6364 of file driver_mfrc522.c.

◆ mfrc522_get_timer_gated_mode()

uint8_t mfrc522_get_timer_gated_mode ( mfrc522_handle_t handle,
mfrc522_timer_gated_mode_t mode 
)

get the timer gated mode

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*modepointer to a timer gated mode buffer
Returns
status code
  • 0 success
  • 1 get timer gated mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6066 of file driver_mfrc522.c.

◆ mfrc522_get_timer_prescal_even()

uint8_t mfrc522_get_timer_prescal_even ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the timer prescal even status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer prescal even failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4898 of file driver_mfrc522.c.

◆ mfrc522_get_timer_prescaler()

uint8_t mfrc522_get_timer_prescaler ( mfrc522_handle_t handle,
uint16_t *  t 
)

get the timer prescaler

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*tpointer to a prescaler buffer
Returns
status code
  • 0 success
  • 1 get timer prescaler failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6245 of file driver_mfrc522.c.

◆ mfrc522_get_timer_reload()

uint8_t mfrc522_get_timer_reload ( mfrc522_handle_t handle,
uint16_t *  reload 
)

get the timer reload

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*reloadpointer to a reload buffer
Returns
status code
  • 0 success
  • 1 get timer reload failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6327 of file driver_mfrc522.c.

◆ mfrc522_get_tx_crc_generation()

uint8_t mfrc522_get_tx_crc_generation ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the tx crc generation status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get tx crc generation failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3481 of file driver_mfrc522.c.

◆ mfrc522_get_tx_input()

uint8_t mfrc522_get_tx_input ( mfrc522_handle_t handle,
mfrc522_tx_input_t input 
)

get the tx input

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*inputpointer to a tx input buffer
Returns
status code
  • 0 success
  • 1 get tx input failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4221 of file driver_mfrc522.c.

◆ mfrc522_get_tx_last_bits()

uint8_t mfrc522_get_tx_last_bits ( mfrc522_handle_t handle,
uint8_t *  bits 
)

get the tx last bits

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*bitspointer to a bits buffer
Returns
status code
  • 0 success
  • 1 get tx last bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2781 of file driver_mfrc522.c.

◆ mfrc522_get_tx_speed()

uint8_t mfrc522_get_tx_speed ( mfrc522_handle_t handle,
mfrc522_speed_t speed 
)

get the tx speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*speedpointer to a tx speed buffer
Returns
status code
  • 0 success
  • 1 get tx speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3563 of file driver_mfrc522.c.

◆ mfrc522_get_tx_wait()

uint8_t mfrc522_get_tx_wait ( mfrc522_handle_t handle,
uint8_t *  t 
)

get the tx wait

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*tpointer to a wait buffer
Returns
status code
  • 0 success
  • 1 get tx wait failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5165 of file driver_mfrc522.c.

◆ mfrc522_get_tx_wait_rf()

uint8_t mfrc522_get_tx_wait_rf ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the rf tx wait status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get tx wait rf failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3235 of file driver_mfrc522.c.

◆ mfrc522_get_value_clear_after_coll()

uint8_t mfrc522_get_value_clear_after_coll ( mfrc522_handle_t handle,
mfrc522_bool_t enable 
)

get the value clear after coll status

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get value clear after coll failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2997 of file driver_mfrc522.c.

◆ mfrc522_get_water_level()

uint8_t mfrc522_get_water_level ( mfrc522_handle_t handle,
uint8_t *  level 
)

get the water level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[out]*levelpointer to a level buffer
Returns
status code
  • 0 success
  • 1 get water level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2493 of file driver_mfrc522.c.

◆ mfrc522_info()

uint8_t mfrc522_info ( mfrc522_info_t info)

get chip information

Parameters
[out]*infopointer to an mfrc522 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 7828 of file driver_mfrc522.c.

◆ mfrc522_init()

uint8_t mfrc522_init ( mfrc522_handle_t handle)

initialize the chip

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 iic, spi or uart initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 interface is invalid
  • 5 get id failed
  • 6 check id failed
Note
none

Definition at line 348 of file driver_mfrc522.c.

◆ mfrc522_irq_handler()

uint8_t mfrc522_irq_handler ( mfrc522_handle_t handle)

irq handler

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 719 of file driver_mfrc522.c.

◆ mfrc522_set_addr_pin()

uint8_t mfrc522_set_addr_pin ( mfrc522_handle_t handle,
uint8_t  addr_pin 
)

set the iic address pin

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 302 of file driver_mfrc522.c.

◆ mfrc522_set_antenna_driver()

uint8_t mfrc522_set_antenna_driver ( mfrc522_handle_t handle,
mfrc522_antenna_driver_t  driver,
mfrc522_bool_t  enable 
)

enable or disable the antenna driver

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]driverantenna driver type
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set antenna driver failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4011 of file driver_mfrc522.c.

◆ mfrc522_set_channel_reception()

uint8_t mfrc522_set_channel_reception ( mfrc522_handle_t handle,
mfrc522_channel_reception_t  reception 
)

set the channel reception

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]receptionchannel reception
Returns
status code
  • 0 success
  • 1 set channel reception failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4689 of file driver_mfrc522.c.

◆ mfrc522_set_clear_temperature_error()

uint8_t mfrc522_set_clear_temperature_error ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable clear temperature error

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set clear temperature error failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2239 of file driver_mfrc522.c.

◆ mfrc522_set_collision_level()

uint8_t mfrc522_set_collision_level ( mfrc522_handle_t handle,
uint8_t  level 
)

set the collision level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]levelcollision level
Returns
status code
  • 0 success
  • 1 set collision level failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 level is over 7
Note
none

Definition at line 4601 of file driver_mfrc522.c.

◆ mfrc522_set_command()

uint8_t mfrc522_set_command ( mfrc522_handle_t handle,
mfrc522_command_t  command 
)

set the command

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]commandset command
Returns
status code
  • 0 success
  • 1 set command failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1386 of file driver_mfrc522.c.

◆ mfrc522_set_contactless_uart_input()

uint8_t mfrc522_set_contactless_uart_input ( mfrc522_handle_t handle,
mfrc522_contactless_uart_input_t  input 
)

set the contactless uart input

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]inputcontactless uart input
Returns
status code
  • 0 success
  • 1 set contactless uart input failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4340 of file driver_mfrc522.c.

◆ mfrc522_set_crc_msb_first()

uint8_t mfrc522_set_crc_msb_first ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable the crc msb first

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set crc msb first failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3108 of file driver_mfrc522.c.

◆ mfrc522_set_crc_preset()

uint8_t mfrc522_set_crc_preset ( mfrc522_handle_t handle,
mfrc522_crc_preset_t  preset 
)

set the crc preset

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]presetcrc preset
Returns
status code
  • 0 success
  • 1 set crc preset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3354 of file driver_mfrc522.c.

◆ mfrc522_set_cwgsn()

uint8_t mfrc522_set_cwgsn ( mfrc522_handle_t handle,
uint8_t  n 
)

set the cwgsn

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]nparam
Returns
status code
  • 0 success
  • 1 set cwgsn failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 n is over 0xF
Note
none

Definition at line 5584 of file driver_mfrc522.c.

◆ mfrc522_set_cwgsp()

uint8_t mfrc522_set_cwgsp ( mfrc522_handle_t handle,
uint8_t  n 
)

set the cwgsp

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]nparam
Returns
status code
  • 0 success
  • 1 set cwgsp failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 n is over 0x3F
Note
none

Definition at line 5762 of file driver_mfrc522.c.

◆ mfrc522_set_fifo_data()

uint8_t mfrc522_set_fifo_data ( mfrc522_handle_t handle,
uint8_t *  data,
uint8_t  len 
)

set the fifo data

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 set fifo data failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 64
Note
len <= 64

Definition at line 2323 of file driver_mfrc522.c.

◆ mfrc522_set_fix_iq()

uint8_t mfrc522_set_fix_iq ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable fix iq

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set fix iq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4771 of file driver_mfrc522.c.

◆ mfrc522_set_force_100_ask()

uint8_t mfrc522_set_force_100_ask ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable force 100 ask

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set force 100 ask failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4094 of file driver_mfrc522.c.

◆ mfrc522_set_force_iic_high_speed()

uint8_t mfrc522_set_force_iic_high_speed ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable force iic high speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set force iic high speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2157 of file driver_mfrc522.c.

◆ mfrc522_set_interface()

uint8_t mfrc522_set_interface ( mfrc522_handle_t handle,
mfrc522_interface_t  interface 
)

set the chip interface

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 260 of file driver_mfrc522.c.

◆ mfrc522_set_interrupt1()

uint8_t mfrc522_set_interrupt1 ( mfrc522_handle_t handle,
mfrc522_interrupt1_t  type,
mfrc522_bool_t  enable 
)

enable or disable the interrupt1

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]typeinterrupt1 type
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt1 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1469 of file driver_mfrc522.c.

◆ mfrc522_set_interrupt1_mark()

uint8_t mfrc522_set_interrupt1_mark ( mfrc522_handle_t handle,
mfrc522_interrupt_mark_t  mark 
)

set the interrupt1 mark

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]markinterrupt1 mark type
Returns
status code
  • 0 success
  • 1 set interrupt1 mark failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1634 of file driver_mfrc522.c.

◆ mfrc522_set_interrupt1_pin_invert()

uint8_t mfrc522_set_interrupt1_pin_invert ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable interrupt1 pin invert

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt1 pin invert failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1552 of file driver_mfrc522.c.

◆ mfrc522_set_interrupt2()

uint8_t mfrc522_set_interrupt2 ( mfrc522_handle_t handle,
mfrc522_interrupt2_t  type,
mfrc522_bool_t  enable 
)

enable or disable the interrupt2

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]typeinterrupt2 type
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1680 of file driver_mfrc522.c.

◆ mfrc522_set_interrupt2_mark()

uint8_t mfrc522_set_interrupt2_mark ( mfrc522_handle_t handle,
mfrc522_interrupt_mark_t  mark 
)

set the interrupt2 mark

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]markinterrupt2 mark type
Returns
status code
  • 0 success
  • 1 set interrupt2 mark failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1845 of file driver_mfrc522.c.

◆ mfrc522_set_interrupt_pin_type()

uint8_t mfrc522_set_interrupt_pin_type ( mfrc522_handle_t handle,
mfrc522_interrupt_pin_type_t  type 
)

set the interrupt pin type

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]typeinterrupt pin type
Returns
status code
  • 0 success
  • 1 set interrupt pin type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1763 of file driver_mfrc522.c.

◆ mfrc522_set_mfin_polarity()

uint8_t mfrc522_set_mfin_polarity ( mfrc522_handle_t handle,
mfrc522_mfin_polarity_t  polarity 
)

set the mfin polarity

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]polaritymfin polarity
Returns
status code
  • 0 success
  • 1 set mfin polarity failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3272 of file driver_mfrc522.c.

◆ mfrc522_set_mfout_input()

uint8_t mfrc522_set_mfout_input ( mfrc522_handle_t handle,
mfrc522_mfout_input_t  input 
)

set the mfout input

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]inputmfout input
Returns
status code
  • 0 success
  • 1 set mfout input failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4258 of file driver_mfrc522.c.

◆ mfrc522_set_mifare_crypto1_on()

uint8_t mfrc522_set_mifare_crypto1_on ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable mifare crypto1 on

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set mifare crypto1 on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2112 of file driver_mfrc522.c.

◆ mfrc522_set_min_level()

uint8_t mfrc522_set_min_level ( mfrc522_handle_t handle,
uint8_t  level 
)

set the min level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]levelmin level
Returns
status code
  • 0 success
  • 1 set min level failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 level is over 0xF
Note
none

Definition at line 4512 of file driver_mfrc522.c.

◆ mfrc522_set_modgsn()

uint8_t mfrc522_set_modgsn ( mfrc522_handle_t handle,
uint8_t  n 
)

set the modgsn

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]nparam
Returns
status code
  • 0 success
  • 1 set modgsn failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 n is over 0xF
Note
none

Definition at line 5673 of file driver_mfrc522.c.

◆ mfrc522_set_modgsp()

uint8_t mfrc522_set_modgsp ( mfrc522_handle_t handle,
uint8_t  n 
)

set the modgsp

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]nparam
Returns
status code
  • 0 success
  • 1 set modgsp failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 n is over 0x3F
Note
none

Definition at line 5851 of file driver_mfrc522.c.

◆ mfrc522_set_modulation_invert()

uint8_t mfrc522_set_modulation_invert ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable the modulation invert

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set modulation invert failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3600 of file driver_mfrc522.c.

◆ mfrc522_set_modulation_width()

uint8_t mfrc522_set_modulation_width ( mfrc522_handle_t handle,
uint8_t  width 
)

set the modulation width

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]widthmodulation width
Returns
status code
  • 0 success
  • 1 set modulation width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5431 of file driver_mfrc522.c.

◆ mfrc522_set_parity_disable()

uint8_t mfrc522_set_parity_disable ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable parity disable

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set parity disable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5202 of file driver_mfrc522.c.

◆ mfrc522_set_power_down()

uint8_t mfrc522_set_power_down ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable power down

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set power down failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1304 of file driver_mfrc522.c.

◆ mfrc522_set_receiver_analog()

uint8_t mfrc522_set_receiver_analog ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable the analog part of the receiver

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set receiver analog failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1222 of file driver_mfrc522.c.

◆ mfrc522_set_rx_align()

uint8_t mfrc522_set_rx_align ( mfrc522_handle_t handle,
mfrc522_rx_align_t  align 
)

set the rx align

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]alignrx align
Returns
status code
  • 0 success
  • 1 set rx align failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2870 of file driver_mfrc522.c.

◆ mfrc522_set_rx_crc_generation()

uint8_t mfrc522_set_rx_crc_generation ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable the rx crc generation

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set rx crc generation failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3682 of file driver_mfrc522.c.

◆ mfrc522_set_rx_gain()

uint8_t mfrc522_set_rx_gain ( mfrc522_handle_t handle,
mfrc522_rx_gain_t  gain 
)

set the rx gain

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]gainrx gain
Returns
status code
  • 0 success
  • 1 set rx gain failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5501 of file driver_mfrc522.c.

◆ mfrc522_set_rx_multiple()

uint8_t mfrc522_set_rx_multiple ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable rx multiple

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set rx multiple failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3928 of file driver_mfrc522.c.

◆ mfrc522_set_rx_no_error()

uint8_t mfrc522_set_rx_no_error ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable rx no error

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set rx no error failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3846 of file driver_mfrc522.c.

◆ mfrc522_set_rx_speed()

uint8_t mfrc522_set_rx_speed ( mfrc522_handle_t handle,
mfrc522_speed_t  speed 
)

set the rx speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]speedrx speed
Returns
status code
  • 0 success
  • 1 set rx speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3764 of file driver_mfrc522.c.

◆ mfrc522_set_rx_wait()

uint8_t mfrc522_set_rx_wait ( mfrc522_handle_t handle,
uint8_t  t 
)

set the rx wait

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]trx wait
Returns
status code
  • 0 success
  • 1 set rx wait failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 t is over 0x3F
Note
none

Definition at line 4423 of file driver_mfrc522.c.

◆ mfrc522_set_serial_speed()

uint8_t mfrc522_set_serial_speed ( mfrc522_handle_t handle,
uint8_t  t0,
uint8_t  t1 
)

set the serial speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]t0speed parm0
[in]t1speed parm1
Returns
status code
  • 0 success
  • 1 set serial speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 t0 is over 0x7
  • 5 t1 is over 0x1F
Note
speed t0 t1 7200 0x07 0x14 9600 0x07 0x0B 14400 0x06 0x1A 19200 0x06 0x0B 38400 0x05 0x0B 57600 0x04 0x1A 115200 0x03 0x1A 128000 0x03 0x14 230400 0x02 0x1A 460800 0x01 0x1A 921600 0x00 0x1C 1228800 0x00 0x15

Definition at line 5299 of file driver_mfrc522.c.

◆ mfrc522_set_timer_auto()

uint8_t mfrc522_set_timer_auto ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable timer auto

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set timer auto failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5939 of file driver_mfrc522.c.

◆ mfrc522_set_timer_auto_restart()

uint8_t mfrc522_set_timer_auto_restart ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable timer auto restart

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set timer auto restart failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6103 of file driver_mfrc522.c.

◆ mfrc522_set_timer_constant_reception()

uint8_t mfrc522_set_timer_constant_reception ( mfrc522_handle_t handle,
uint8_t  t 
)

set the timer constant reception

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]treception
Returns
status code
  • 0 success
  • 1 set timer constant reception failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 t is over 3
Note
none

Definition at line 4936 of file driver_mfrc522.c.

◆ mfrc522_set_timer_constant_sync()

uint8_t mfrc522_set_timer_constant_sync ( mfrc522_handle_t handle,
uint8_t  t 
)

set the timer constant sync

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]tsync
Returns
status code
  • 0 success
  • 1 set timer constant sync failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 t is over 3
Note
none

Definition at line 5025 of file driver_mfrc522.c.

◆ mfrc522_set_timer_gated_mode()

uint8_t mfrc522_set_timer_gated_mode ( mfrc522_handle_t handle,
mfrc522_timer_gated_mode_t  mode 
)

set the timer gated mode

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]modetimer gated mode
Returns
status code
  • 0 success
  • 1 set timer gated mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6021 of file driver_mfrc522.c.

◆ mfrc522_set_timer_prescal_even()

uint8_t mfrc522_set_timer_prescal_even ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable timer prescal even

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set timer prescal even failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4853 of file driver_mfrc522.c.

◆ mfrc522_set_timer_prescaler()

uint8_t mfrc522_set_timer_prescaler ( mfrc522_handle_t handle,
uint16_t  t 
)

set the timer prescaler

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]tprescaler
Returns
status code
  • 0 success
  • 1 set timer prescaler failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 t is over 0xFFF
Note
none

Definition at line 6186 of file driver_mfrc522.c.

◆ mfrc522_set_timer_reload()

uint8_t mfrc522_set_timer_reload ( mfrc522_handle_t handle,
uint16_t  reload 
)

set the timer reload

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]reloadreload param
Returns
status code
  • 0 success
  • 1 set timer reload failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6289 of file driver_mfrc522.c.

◆ mfrc522_set_tx_crc_generation()

uint8_t mfrc522_set_tx_crc_generation ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable tx crc generation

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set tx crc generation failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3436 of file driver_mfrc522.c.

◆ mfrc522_set_tx_input()

uint8_t mfrc522_set_tx_input ( mfrc522_handle_t handle,
mfrc522_tx_input_t  input 
)

set the tx input

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]inputtx input
Returns
status code
  • 0 success
  • 1 set tx input failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4176 of file driver_mfrc522.c.

◆ mfrc522_set_tx_last_bits()

uint8_t mfrc522_set_tx_last_bits ( mfrc522_handle_t handle,
uint8_t  bits 
)

set the tx last bits

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]bitsset bits
Returns
status code
  • 0 success
  • 1 set tx last bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 bits is over 7
Note
none

Definition at line 2819 of file driver_mfrc522.c.

◆ mfrc522_set_tx_speed()

uint8_t mfrc522_set_tx_speed ( mfrc522_handle_t handle,
mfrc522_speed_t  speed 
)

set the tx speed

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]speedtx speed
Returns
status code
  • 0 success
  • 1 set tx speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3518 of file driver_mfrc522.c.

◆ mfrc522_set_tx_wait()

uint8_t mfrc522_set_tx_wait ( mfrc522_handle_t handle,
uint8_t  t 
)

set the tx wait

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]twait
Returns
status code
  • 0 success
  • 1 set tx wait failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 t is over 3
Note
none

Definition at line 5114 of file driver_mfrc522.c.

◆ mfrc522_set_tx_wait_rf()

uint8_t mfrc522_set_tx_wait_rf ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable the rf tx wait

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set tx wait rf failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3190 of file driver_mfrc522.c.

◆ mfrc522_set_value_clear_after_coll()

uint8_t mfrc522_set_value_clear_after_coll ( mfrc522_handle_t handle,
mfrc522_bool_t  enable 
)

enable or disable value clear after coll

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set value clear after coll failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2952 of file driver_mfrc522.c.

◆ mfrc522_set_water_level()

uint8_t mfrc522_set_water_level ( mfrc522_handle_t handle,
uint8_t  level 
)

set the water level

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]levelwater level
Returns
status code
  • 0 success
  • 1 set water level failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 level is over 0x3F
Note
level <= 0x3F

Definition at line 2530 of file driver_mfrc522.c.

◆ mfrc522_start_send()

uint8_t mfrc522_start_send ( mfrc522_handle_t handle)

start the transmission of data

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 start send failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2693 of file driver_mfrc522.c.

◆ mfrc522_start_timer()

uint8_t mfrc522_start_timer ( mfrc522_handle_t handle)

start the timer

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 start timer failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2613 of file driver_mfrc522.c.

◆ mfrc522_stop_send()

uint8_t mfrc522_stop_send ( mfrc522_handle_t handle)

stop the transmission of data

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 stop send failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2737 of file driver_mfrc522.c.

◆ mfrc522_stop_timer()

uint8_t mfrc522_stop_timer ( mfrc522_handle_t handle)

stop the timer

Parameters
[in]*handlepointer to an mfrc522 handle structure
Returns
status code
  • 0 success
  • 1 stop timer failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2570 of file driver_mfrc522.c.

◆ mfrc522_transceiver()

uint8_t mfrc522_transceiver ( mfrc522_handle_t handle,
mfrc522_command_t  command,
uint8_t *  in_buf,
uint8_t  in_len,
uint8_t *  out_buf,
uint8_t *  out_len,
uint8_t *  err,
uint32_t  ms 
)

mfrc522 transceiver

Parameters
[in]*handlepointer to an mfrc522 handle structure
[in]commandset command
[in]*in_bufpointer to an input buffer
[in]in_leninput length
[out]*out_bufpointer to an output buffer
[in,out]*out_lenpointer to an output length buffer
[out]*errpointer to an error buffer
[in]mstimeout in ms
Returns
status code
  • 0 success
  • 1 transmit failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 buffer is NULL
  • 5 in_len is over 64
  • 6 read timeout
  • 7 timer timeout
  • 8 find error
Note
none

Definition at line 891 of file driver_mfrc522.c.