Generic driver for the RWD RFID Modules from IB Technology.
Diff: RWDModule.h
- Revision:
- 1:e96aaf4d5c55
- Parent:
- 0:a893227b988a
- Child:
- 2:37fafd1e1a20
--- a/RWDModule.h Mon Jul 12 09:31:45 2010 +0000 +++ b/RWDModule.h Tue Jul 13 10:37:26 2010 +0000 @@ -12,23 +12,20 @@ RWDModule(PinName tx, PinName rx, PinName cts); virtual ~RWDModule(); - -//protected: void command(byte cmd, const byte* params, int paramsLen, byte* resp, int respLen, byte ackOk, byte ackOkMask); //Ack Byte is not included in the resp buf - bool ready(); //Rady for a command / response is available + bool ready(); //Ready for a command / response is available - bool result(byte* pAck = NULL); + bool result(byte* pAck = NULL); //Get wether last command was succesful, and complete ack byte if a ptr is provided private: - void intClearToSend(); - void intTx(); - void intRx(); + void intClearToSend(); //Called on interrupt when CTS line falls + void intTx(); //Called on interrupt when TX buffer is not full anymore (bytes sent) + void intRx(); //Called on interrrupt when RX buffer is not empty anymore (bytes received) Serial m_serial; InterruptIn m_cts; -// byte m_buf[64]; byte m_cmd; byte* m_paramsBuf; byte* m_respBuf;