WISP ERT (Client)  1.0.0
The WISP Extended Runtime (WISP side)
rfid.h
Go to the documentation of this file.
1 
9 #ifndef RFID_H_
10 #define RFID_H_
11 
12 #include <stdint.h>
13 
14 //RFID MODE DEFS
15 #define MODE_STD (0) /* tag only responds up to ACKs (even ignores ReqRNs) */
16 #define MODE_READ (BIT0) /* tag responds to read commands */
17 #define MODE_WRITE (BIT1) /* tag responds to write commands */
18 #define MODE_USES_SEL (BIT2) /* tags only use select when they want to play nice (they don't have to) */
19 
20 // RFID command IDs
21 #define CMD_ID_ACK (BIT0)
22 #define CMD_ID_READ (BIT1)
23 #define CMD_ID_WRITE (BIT2)
24 #define CMD_ID_BLOCKWRITE (BIT3)
25 
26 // Client interface to read, write, and EPC memory buffers
27 typedef struct {
28  uint8_t* epcBuf;
29  uint16_t* writeBufPtr;
30  uint16_t* blockWriteBufPtr;
31  uint16_t* blockWriteSizePtr;
32  uint8_t* readBufPtr;
34 
35 extern void WISP_doRFID(void);
36 
37 // Callback registration
38 void WISP_registerCallback_ACK(void(*fnPtr)(void));
39 void WISP_registerCallback_READ(void(*fnPtr)(void));
40 void WISP_registerCallback_WRITE(void(*fnPtr)(void));
41 void WISP_registerCallback_BLOCKWRITE(void(*fnPtr)(void));
42 
43 // Access functions for RFID mode parameters
44 void WISP_setMode(uint8_t newMode);
45 void WISP_setAbortConditions(uint8_t newAbortConditions);
46 
47 
48 // Linker hack: We need to reference assembly ISRs directly somewhere to force linker to include them in binary.
49 extern void RX_ISR(void);
50 extern void Timer0A0_ISR(void);
51 extern void Timer0A1_ISR(void);
52 
53 
54 
55 
56 
57 #endif /* RFID_H_ */
void WISP_registerCallback_BLOCKWRITE(void(*fnPtr)(void))
Definition: interface.c:47
void WISP_registerCallback_ACK(void(*fnPtr)(void))
Definition: interface.c:26
uint16_t * writeBufPtr
Definition: rfid.h:29
uint8_t * epcBuf
Definition: rfid.h:28
void WISP_setMode(uint8_t newMode)
Definition: interface.c:55
void Timer0A1_ISR(void)
void WISP_doRFID(void)
void WISP_registerCallback_WRITE(void(*fnPtr)(void))
Definition: interface.c:40
uint16_t * blockWriteSizePtr
Definition: rfid.h:31
Definition: rfid.h:27
uint8_t * readBufPtr
Definition: rfid.h:32
void RX_ISR(void)
void WISP_setAbortConditions(uint8_t newAbortConditions)
Definition: interface.c:63
uint16_t * blockWriteBufPtr
Definition: rfid.h:30
void Timer0A0_ISR(void)
void WISP_registerCallback_READ(void(*fnPtr)(void))
Definition: interface.c:33