LLAP Library for Ciseco wireless products.
Dependents: Ciseco_LLAP_Test Ciseco_SRF_Shield
Library for Ciseco wireless modules http://shop.ciseco.co.uk/rf-module-range/
Tested with Nucleo F401RE and http://shop.ciseco.co.uk/srf-shield-wireless-transciever-for-all-arduino-type-boards/
LLAPSerial.h@0:c1b97c30cbc5, 2014-04-15 (annotated)
- Committer:
- SomeRandomBloke
- Date:
- Tue Apr 15 22:02:18 2014 +0000
- Revision:
- 0:c1b97c30cbc5
- Child:
- 1:8f3ec117823d
Initial commit, needs documenting properly.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
SomeRandomBloke | 0:c1b97c30cbc5 | 1 | // LLAPSerial.h |
SomeRandomBloke | 0:c1b97c30cbc5 | 2 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 3 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 4 | #ifndef _LLAPSERIAL_h |
SomeRandomBloke | 0:c1b97c30cbc5 | 5 | #define _LLAPSERIAL_h |
SomeRandomBloke | 0:c1b97c30cbc5 | 6 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 7 | #include "mbed.h" |
SomeRandomBloke | 0:c1b97c30cbc5 | 8 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 9 | class LLAPSerial |
SomeRandomBloke | 0:c1b97c30cbc5 | 10 | { |
SomeRandomBloke | 0:c1b97c30cbc5 | 11 | private: |
SomeRandomBloke | 0:c1b97c30cbc5 | 12 | char cMessage[13]; // Raw receive buffer |
SomeRandomBloke | 0:c1b97c30cbc5 | 13 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 14 | char* inPtr; |
SomeRandomBloke | 0:c1b97c30cbc5 | 15 | void processMessage(); |
SomeRandomBloke | 0:c1b97c30cbc5 | 16 | void SerialEvent(); |
SomeRandomBloke | 0:c1b97c30cbc5 | 17 | Serial srf; |
SomeRandomBloke | 0:c1b97c30cbc5 | 18 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 19 | public: |
SomeRandomBloke | 0:c1b97c30cbc5 | 20 | LLAPSerial(PinName txPin, PinName rxPin, char *dID = "--" ); |
SomeRandomBloke | 0:c1b97c30cbc5 | 21 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 22 | void sendMessage(char* sToSend); |
SomeRandomBloke | 0:c1b97c30cbc5 | 23 | void sendMessage(char* sToSend, char* valueToSend); |
SomeRandomBloke | 0:c1b97c30cbc5 | 24 | void sendInt(char *sToSend, int value); |
SomeRandomBloke | 0:c1b97c30cbc5 | 25 | void sendIntWithDP(char *sToSend, int value, int decimalPlaces); |
SomeRandomBloke | 0:c1b97c30cbc5 | 26 | void setDeviceId(char* cId); |
SomeRandomBloke | 0:c1b97c30cbc5 | 27 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 28 | char deviceId[2]; |
SomeRandomBloke | 0:c1b97c30cbc5 | 29 | char sMessage[15]; // Received message buffer |
SomeRandomBloke | 0:c1b97c30cbc5 | 30 | bool bMsgReceived; |
SomeRandomBloke | 0:c1b97c30cbc5 | 31 | }; |
SomeRandomBloke | 0:c1b97c30cbc5 | 32 | |
SomeRandomBloke | 0:c1b97c30cbc5 | 33 | #endif |
SomeRandomBloke | 0:c1b97c30cbc5 | 34 |