Basic Read and Writer implementation for an OEM Mifare RWD Device.
RWDModule Class Reference
Generic driver for the RWD RFID Modules from IB Technology. More...
#include <RWDModule.h>
Inherited by RWDMifare.
Public Member Functions | |
RWDModule (PinName tx, PinName rx, PinName cts) | |
Creates an instance of the class. | |
void | command (uint8_t cmd, const uint8_t *params, int paramsLen, uint8_t *resp, size_t respLen, uint8_t ackOk, size_t ackOkMask) |
Executes a command. | |
bool | ready () |
Ready for a command / response is available. | |
bool | result (uint8_t *pAck=NULL) |
Get whether last command was succesful, and complete ack byte if a ptr is provided. |
Detailed Description
Generic driver for the RWD RFID Modules from IB Technology.
The RWD modules from IB Technology are RFID readers working with different frequencies and protocols but with a common instructions set and pinout.
Definition at line 32 of file RWDModule.h.
Constructor & Destructor Documentation
RWDModule | ( | PinName | tx, |
PinName | rx, | ||
PinName | cts | ||
) |
Creates an instance of the class.
Connect module using serial port pins tx, rx and DigitalIn pin cts (clear-to-send).
Definition at line 25 of file RWDModule.cpp.
Member Function Documentation
void command | ( | uint8_t | cmd, |
const uint8_t * | params, | ||
int | paramsLen, | ||
uint8_t * | resp, | ||
size_t | respLen, | ||
uint8_t | ackOk, | ||
size_t | ackOkMask | ||
) |
Executes a command.
Destroys instance.
Executes the command cmd on the reader, with parameters set in params buffer of paramsLen length. The acknowledge byte sent back by the reader masked with ackOkMask must be equal to ackOk for the command to be considered a success. If so, the result is stored in buffer resp of length respLen. This is a non-blocking function, and ready() should be called to check completion. Please note that the buffers references must remain valid until the command has been executed.
Definition at line 36 of file RWDModule.cpp.
bool ready | ( | ) |
Ready for a command / response is available.
Returns true if the previous command has been executed and an other command is ready to be sent.
Definition at line 62 of file RWDModule.cpp.
bool result | ( | uint8_t * | pAck = NULL ) |
Get whether last command was succesful, and complete ack byte if a ptr is provided.
Returns true if the previous command was successful. If pAck is provided, the actual acknowledge byte returned by the reader is stored in that variable.
Definition at line 67 of file RWDModule.cpp.
Generated on Wed Jul 13 2022 03:38:17 by 1.7.2