rfidser library  v0.5
Functions for use with the Parallax RFID Card Reader - Serial.
rfidser.h
Go to the documentation of this file.
1 
21 #ifndef RFIDSER_H
22 #define RFIDSER_H
23 
24 #if defined(__cplusplus)
25 extern "C" {
26 #endif
27 
28 
29 #include "simpletools.h"
30 #include "fdserial.h"
31 
32 
38 typedef struct rfid_struct
39 {
40  int rx_head; /* receive queue head */
41  int rx_tail; /* receive queue tail */
42  int tx_head; /* transmit queue head */
43  int tx_tail; /* transmit queue tail */
44  int rx_pin; /* recieve pin */
45  int tx_pin; /* transmit pin */
46  int mode; /* interface mode */
47  int ticks; /* clkfreq / baud */
48  char *buffptr; /* pointer to rx buffer */
49  char *idstr;
50  int en;
51 } rfid_st;
52 
53 
57 typedef text_t rfidser;
58 
74 rfidser *rfid_open(int soutPin, int enablePin);
75 
76 
83 void rfidser_close(rfidser *device);
84 
85 
91 void rfid_reset(rfidser *device);
92 
93 
99 void rfid_disable(rfidser *device);
100 
101 
107 void rfid_enable(rfidser *device);
108 
109 
120 char *rfid_get(rfidser *device, int timeoutms);
121 
122 
123 #if defined(__cplusplus)
124 }
125 #endif
126 /* __cplusplus */
127 #endif
128 /* RFIDSER_H */
129 
130