interrupt handling
Diff: readerComm.h
- Revision:
- 7:96baf1b2fd07
- Parent:
- 6:3c510c297e2f
- Child:
- 9:9266e0109d26
diff -r 3c510c297e2f -r 96baf1b2fd07 readerComm.h --- a/readerComm.h Thu Apr 02 21:10:48 2015 +0000 +++ b/readerComm.h Tue Apr 07 20:06:51 2015 +0000 @@ -1,35 +1,22 @@ - -/* - Header file for readerComm.cpp -*/ // Prototypes -//void SpiInit1(void); -void SpiInit(void); -void trf797xInitialSettings(void); -void trf797xDirectCommand(uint8_t *buffer); -void trf797xWriteSingle(uint8_t *buffer, uint8_t length); -void trf797xReadSingle(uint8_t *buffer, uint8_t number); -void trf797xReadContinuous(uint8_t *buffer, uint8_t length); -void trf797xRawWrite(uint8_t *buffer, uint8_t length); -//void trf797xStopDecoders(void); -//void trf797xRunDecoders(void); -//void trf797xTxNextSlot(void); -//void trf797xtDisableSlotCounter(void); -//void trf797xReset(void); -//void trf797xTurnRfOn(void); -//void trf797xTurnRfOff(void); -//void trf797xWriteIsoControl(uint8_t iso_control); -//void iso15693FindTag(void); -//void iso15693Anticollision(uint8_t *mask, uint8_t length); -void PowerUpNFC(void); -void PowerDownNFC(void); -void NFCInit(void); -void RegisterReInitNFC(void); -void RegistersReadNFC(void); -void InventoryReqNFC(void); -void ReadNFC(void); -void PollNFC(void); +//void SpiInit1(void); // SPI 250 Khz +void SpiInit(void); // SPI 1Mhz +void trf797xDirectCommand(uint8_t *buffer); // send direct command to trf7970a +void trf797xWriteSingle(uint8_t *buffer, uint8_t length); // write to trf7970a register +void trf797xReadSingle(uint8_t *buffer, uint8_t number); // read trf7970a register +void trf797xReadContinuous(uint8_t *buffer, uint8_t length); // read continuous bytes from trf7970a +void trf797xRawWrite(uint8_t *buffer, uint8_t length); // raw write to trf7970a FIFO +void PowerUpNFC(void); // powerup trf7970a +void PowerDownNFC(void); // powerdown trf7970a +void NFCInit(void); // initialize trf7970 iso control =0x02, chip status control=0x20, modulator=0x21 +void RegisterReInitNFC(void); // reinitialize nfc status registers +void RegistersReadNFC(void); // read nfc status registers +void InventoryReqNFC(void); // inventory request to trf7970a +void MemReadReqNFC(void); // memory read request to trf7970a +void ReadNFC(void); // read teag ID/Single Read +void PollNFC(uint8_t *irqStatus); // read rx complete irq from trf7970a. +void handlerNFC(void); // trf7970 irq handler // Booleans #define DESELECT 1 #define SELECT 0 @@ -91,7 +78,7 @@ #define NFC_TARGET_PROTOCOL 0x19 #define TEST_SETTINGS_1 0x1A #define TEST_SETTINGS_2 0x1B -#define FIFO_CONTROL 0x1C +#define FIFO_COUNTER 0x1C #define TX_LENGTH_BYTE_1 0x1D #define TX_LENGTH_BYTE_2 0x1E #define FIFO 0x1F