23#ifndef PN512_REGISTERS_H_
24#define PN512_REGISTERS_H_
34#define PN512_REG_PAGE 0x00
35#define PN512_REG_COMMAND 0x01
36#define PN512_REG_COMIEN 0x02
37#define PN512_REG_DIVIEN 0x03
38#define PN512_REG_COMIRQ 0x04
39#define PN512_REG_DIVIRQ 0x05
40#define PN512_REG_ERROR 0x06
41#define PN512_REG_STATUS1 0x07
42#define PN512_REG_STATUS2 0x08
43#define PN512_REG_FIFODATA 0x09
44#define PN512_REG_FIFOLEVEL 0x0A
45#define PN512_REG_WATERLEVEL 0x0B
46#define PN512_REG_CONTROL 0x0C
47#define PN512_REG_BITFRAMING 0x0D
48#define PN512_REG_COLL 0x0E
52#define PN512_REG_MODE 0x11
53#define PN512_REG_TXMODE 0x12
54#define PN512_REG_RXMODE 0x13
55#define PN512_REG_TXCONTROL 0x14
56#define PN512_REG_TXAUTO 0x15
57#define PN512_REG_TXSEL 0x16
58#define PN512_REG_RXSEL 0x17
59#define PN512_REG_RXTHRESHOLD 0x18
60#define PN512_REG_DEMOD 0x19
61#define PN512_REG_FELNFC1 0x1A
62#define PN512_REG_FELNFC2 0x1B
63#define PN512_REG_MIFNFC 0x1C
64#define PN512_REG_MANUALRCV 0x1D
65#define PN512_REG_TYPEB 0x1E
66#define PN512_REG_SERIALSPEED 0x1F
70#define PN512_REG_CRCRESULT_MSB 0x21
71#define PN512_REG_CRCRESULT_LSB 0x22
72#define PN512_REG_GSNOFF 0x23
73#define PN512_REG_MODWIDTH 0x24
74#define PN512_REG_TXBITPHASE 0x25
75#define PN512_REG_RFCFG 0x26
76#define PN512_REG_GSNON 0x27
77#define PN512_REG_CWGSP 0x28
78#define PN512_REG_MODGSP 0x29
79#define PN512_REG_TMODE_TPRESCALERHIGH 0x2A
80#define PN512_REG_TPRESCALERLOW 0x2B
81#define PN512_REG_TRELOADHIGH 0x2C
82#define PN512_REG_TRELOADLOW 0x2D
83#define PN512_REG_TCOUNTERVALHIGH 0x2E
84#define PN512_REG_TCOUNTERVALLOW 0x2F
88#define PN512_REG_TESTSEL1 0x31
89#define PN512_REG_TESTSEL2 0x32
90#define PN512_REG_TESTPINEN 0x33
91#define PN512_REG_TESTPINVALUE 0x34
92#define PN512_REG_TESTBUS 0x35
93#define PN512_REG_AUTOTEST 0x36
94#define PN512_REG_VERSION 0x37
95#define PN512_REG_ANALOGTEST 0x38
96#define PN512_REG_TESTDAC1 0x39
97#define PN512_REG_TESTDAC2 0x3A
98#define PN512_REG_TESTADC 0x3B
101void pn512_registers_init(
pn512_t *pPN512);
102void pn512_registers_reset(
pn512_t *pPN512);
104void pn512_register_write(
pn512_t *pPN512, uint8_t address, uint8_t data);
105uint8_t pn512_register_read(
pn512_t *pPN512, uint8_t address);
107void pn512_register_switch_page(
pn512_t *pPN512, uint8_t address);