Simplifies reading Parallax Serial RFID Card Reader.
More...
#include "simpletools.h"
#include "fdserial.h"
Go to the source code of this file.
Functions |
rfidser * | rfid_open (int soutPin, int enablePin) |
| Runs the RFID card reading process in another cog.
|
void | rfidser_close (rfidser *device) |
| End RFID card monitoring/reading process and recover cog and stack memory for other purposes.
|
void | rfid_reset (rfidser *device) |
| Reset the RFID reader.
|
void | rfid_disable (rfidser *device) |
| Disable RFID reading process. Reader will ignore any cards swiped.
|
void | rfid_enable (rfidser *device) |
| Enable RFID reading process. Reader will actively scan cards swiped.
|
char * | rfid_get (rfidser *device, int timeoutms) |
| Get RFID code from serial buffer.
|
Detailed Description
Simplifies reading Parallax Serial RFID Card Reader.
- Author
- Andy Lindsay
- Copyright
- Copyright (C) Parallax, Inc. 2014. All Rights MIT Licensed.
- Core Usage
- Each call to rfid_open launches a serial communication process into another core.
- Memory Models
- Use with CMM or LMM.
- Version
- 0.5
Function Documentation
void rfid_disable |
( |
rfidser * |
device | ) |
|
Disable RFID reading process. Reader will ignore any cards swiped.
- Parameters
-
*device | Device identifier returned by rfid_open. |
void rfid_enable |
( |
rfidser * |
device | ) |
|
Enable RFID reading process. Reader will actively scan cards swiped.
- Parameters
-
*device | Device identifier returned by rfid_open. |
char* rfid_get |
( |
rfidser * |
device, |
|
|
int |
timeoutms |
|
) |
| |
Get RFID code from serial buffer.
- Parameters
-
*device | Device identifier returned by rfid_open. |
timeoutms | number of milliseconds to wait before returning. |
- Returns
- Pointer to string with RFID address. Returns "timed out" if no card was scanned before the timeoutms period.
rfidser* rfid_open |
( |
int |
soutPin, |
|
|
int |
enablePin |
|
) |
| |
Runs the RFID card reading process in another cog.
- Parameters
-
soutPin | Propeller I/O pin connected to RFID reader's SOUT pin. |
enablePin | Propeller I/O pin connected to RFID reader's /ENABLE pin. |
- Returns
- Device identifier for use with simpletext, fdserial, and rfidser library functions.
void rfid_reset |
( |
rfidser * |
device | ) |
|
Reset the RFID reader.
- Parameters
-
*device | Device identifier returned by rfid_open. |
void rfidser_close |
( |
rfidser * |
device | ) |
|
End RFID card monitoring/reading process and recover cog and stack memory for other purposes.
- Parameters
-