A libery to connect to telegesis zigbee module. Bassed on implemtation of XBEE
Fork of xbee_lib by
Diff: telegesis.h
- Revision:
- 29:6711180763b6
- Parent:
- 28:c724a8921f01
- Child:
- 30:f9cdb6f62586
--- a/telegesis.h Fri May 09 10:40:27 2014 +0000 +++ b/telegesis.h Thu Jun 05 17:10:37 2014 +0000 @@ -2,6 +2,7 @@ #define telegesis_h #include "mbed.h" +#include <RawSerial.h> /**Eksemple #include "telegesis.h" @@ -27,6 +28,12 @@ #define START_BYTE 0x7e #define ESCAPE 0x7d #define MAX_FRAME_DATA_SIZE 90 +#define ZdataSize 80 +typedef struct { + char Ready; + char ID[17]; + char Data[ZdataSize]; +}ZdatRec; class zigbee { @@ -114,15 +121,17 @@ char HWType[15]; /** incomming data */ - char Zdata[80]; + ZdatRec In; + //char Zdata[ZdataSize]; /** - + */ + void SletZdata(void); char LocalID[17]; /** * indication of incoming data */ - uint8_t Zdat; + //uint8_t Zdat; /** * Indicator on that we have got a ack on a packet */ @@ -166,7 +175,7 @@ // buffer for incoming RX packets. holds only the api specific frame data, starting after the api id byte and prior to checksum - Serial _zbee; + RawSerial _zbee; bool wait4Offline(); bool wait4JPAN(); bool wait4str(char *p);