# register size (in bytes)
REGISTER_SIZE = 4

# command codes
# format: CMD_COMMAND
CMD_WRITE_REGISTER = 0x00
CMD_WRITE_REGISTER_OR_MASK = 0x01
CMD_WRITE_REGISTER_AND_MASK = 0x02
CMD_READ_REGISTER = 0x04
CMD_SEND_DATA = 0x09
CMD_READ_DATA = 0x0A
CMD_LOAD_RF_CONFIGURATION = 0x11
CMD_RF_ON = 0x16
CMD_RF_OFF = 0x17

# register addresses
# format: REG_REGISTER
REG_SYSTEM_CONFIG = 0x00
REG_IRQ_ENABLE = 0x01
REG_IRQ_STATUS = 0x02
REG_IRQ_CLEAR = 0x03
REG_TRANSCEIVER_CONFIG = 0x04
REG_PAD_CONFIG = 0x05
REG_PAD_OUT = 0x07
REG_TIMER0_STATUS = 0x08
REG_TIMER1_STATUS = 0x09
REG_TIMER2_STATUS = 0x0A
REG_TIMER0_RELOAD = 0x0B
REG_TIMER1_RELOAD = 0x0C
REG_TIMER2_RELOAD = 0x0D
REG_TIMER0_CONFIG = 0x0E
REG_TIMER1_CONFIG = 0x0F
REG_TIMER2_CONFIG = 0x10
REG_RX_WAIT_CONFIG = 0x11
REG_CRC_RX_CONFIG = 0x12
REG_RX_STATUS = 0x13
REG_TX_UNDERSHOOT_CONFIG = 0x14
REG_TX_OVERSHOOT_CONFIG = 0x15
REG_TX_DATA_MOD = 0x16
REG_TX_WAIT_CONFIG = 0x17
REG_TX_CONFIG = 0x18
REG_CRC_TX_CONFIG = 0x19
REG_SIGPRO_CONFIG = 0x1A
REG_SIGPRO_CM_CONFIG = 0x1B
REG_SIGPRO_RM_CONFIG = 0x1C
REG_RF_STATUS = 0x1D
REG_AGC_CONFIG = 0x1E
REG_AGC_VALUE = 0x1F
REG_RF_CONTROL_TX = 0x20
REG_RF_CONTROL_TX_CLK = 0x21
REG_RF_CONTROL_RX = 0x22
REG_LOD_CONTROL = 0x23
REG_SYSTEM_STATUS = 0x24
REG_TEMP_CONTROL = 0x25
REG_CECK_CARD_RESULT = 0x26
REG_DPC_CONFIG = 0x27
REG_EMD_CONTROL = 0x28
REG_ANT_CONTROL = 0x29

# load_rf_configuration register values
# format: TX/RX_PROTOCOL_SPEED
# transmitter configuration
TX_ISO_14443_A_106 = 0x00
TX_ISO_14443_A_212 = 0x01
TX_ISO_14443_A_424 = 0x02
TX_ISO_14443_A_848 = 0x03
TX_ISO_14443_B_106 = 0x04
TX_ISO_14443_B_212 = 0x05
TX_ISO_14443_B_424 = 0x06
TX_ISO_14443_B_848 = 0x07
TX_FELICA_212 = 0x08
TX_FELICA_424 = 0x09
TX_NFC_ACTIVE_INITIATOR_106 = 0x0A
TX_NFC_ACTIVE_INITIATOR_212 = 0x0B
TX_NFC_ACTIVE_INITIATOR_424 = 0x0C
TX_ISO_15693_ASK100_26 = 0x0D
TX_ISO_15693_ASK10_26 = 0x0E
TX_ISO_18003M3_424_4_1888 = 0x0F
TX_ISO_18003M3_424_2_944 = 0x10
TX_ISO_18003M3_848_4_1888 = 0x11
TX_ISO_18003M3_848_2_944 = 0x12
TX_ISO_18003M3_424_4_106 = 0x13
TX_ISO_14443_A_PICC_212 = 0x14
TX_ISO_14443_A_PICC_424 = 0x15
TX_ISO_14443_A_PICC_848 = 0x16
TX_NFC_PASSIVE_TARGET_212 = 0x17
TX_NFC_PASSIVE_TARGET_424 = 0x18
TX_NFC_ACTIVE_TARGET_106 = 0x19
TX_NFC_ACTIVE_TARGET_212 = 0x1A
TX_NFC_ACTIVE_TARGET_424 = 0x1B
TX_GTM_ALL = 0x1C
# receiver configuration
RX_ISO_14443_A_106 = 0x80
RX_ISO_14443_A_212 = 0x81
RX_ISO_14443_A_424 = 0x82
RX_ISO_14443_A_848 = 0x83
RX_ISO_14443_B_106 = 0x84
RX_ISO_14443_B_212 = 0x85
RX_ISO_14443_B_424 = 0x86
RX_ISO_14443_B_848 = 0x87
RX_FELICA_212 = 0x88
RX_FELICA_424 = 0x89
RX_NFC_ACTIVE_INITIATOR_106 = 0x8A
RX_NFC_ACTIVE_INITIATOR_212 = 0x8B
RX_NFC_ACTIVE_INITIATOR_424 = 0x8C
RX_ISO_15693_26 = 0x8D
RX_ISO_15693_53 = 0x8E
RX_ISO_18003M3_424_4_106 = 0x8F
RX_ISO_18003M3_424_2_212 = 0x90
RX_ISO_18003M3_848_4_212 = 0x91
RX_ISO_18003M3_848_2_424 = 0x92
RX_ISO_18003M3_424_4_106 = 0x93
RX_ISO_14443_A_PICC_212 = 0x94
RX_ISO_14443_A_PICC_424 = 0x95
RX_ISO_14443_A_PICC_848 = 0x96
RX_NFC_PASSIVE_TARGET_212 = 0x97
RX_NFC_PASSIVE_TARGET_424 = 0x98
RX_NFC_ACTIVE_TARGET_106 = 0x99
RX_NFC_ACTIVE_TARGET_212 = 0x9A
RX_NFC_ACTIVE_TARGET_424 = 0x9B
RX_GTM_ALL = 0x9C
