Éric Bisson
/
Code_APP3_R
app3
Fork of Code_APP1 by
xbee.h@9:dc81d8ee4a97, 2017-02-14 (annotated)
- Committer:
- ericbisson
- Date:
- Tue Feb 14 04:11:07 2017 +0000
- Revision:
- 9:dc81d8ee4a97
app3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ericbisson | 9:dc81d8ee4a97 | 1 | #include "mbed.h" |
ericbisson | 9:dc81d8ee4a97 | 2 | |
ericbisson | 9:dc81d8ee4a97 | 3 | #ifndef XBEE_H |
ericbisson | 9:dc81d8ee4a97 | 4 | #define XBEE_H |
ericbisson | 9:dc81d8ee4a97 | 5 | |
ericbisson | 9:dc81d8ee4a97 | 6 | struct Addresse_64Bit { |
ericbisson | 9:dc81d8ee4a97 | 7 | char bit[8]; |
ericbisson | 9:dc81d8ee4a97 | 8 | }; |
ericbisson | 9:dc81d8ee4a97 | 9 | |
ericbisson | 9:dc81d8ee4a97 | 10 | struct Addresse_16Bit { |
ericbisson | 9:dc81d8ee4a97 | 11 | char bit[2]; |
ericbisson | 9:dc81d8ee4a97 | 12 | }; |
ericbisson | 9:dc81d8ee4a97 | 13 | |
ericbisson | 9:dc81d8ee4a97 | 14 | struct CArray { |
ericbisson | 9:dc81d8ee4a97 | 15 | char* _ptr; |
ericbisson | 9:dc81d8ee4a97 | 16 | short size; |
ericbisson | 9:dc81d8ee4a97 | 17 | char _FrameType; |
ericbisson | 9:dc81d8ee4a97 | 18 | Addresse_64Bit _64bit; |
ericbisson | 9:dc81d8ee4a97 | 19 | Addresse_16Bit _16bit; |
ericbisson | 9:dc81d8ee4a97 | 20 | char* options; |
ericbisson | 9:dc81d8ee4a97 | 21 | char opt_size; |
ericbisson | 9:dc81d8ee4a97 | 22 | }; |
ericbisson | 9:dc81d8ee4a97 | 23 | |
ericbisson | 9:dc81d8ee4a97 | 24 | char calculate_checksum(CArray* message, short header_size); |
ericbisson | 9:dc81d8ee4a97 | 25 | void send(Serial* COM, CArray* message); |
ericbisson | 9:dc81d8ee4a97 | 26 | void read(Serial* COM, CArray* returnValue); |
ericbisson | 9:dc81d8ee4a97 | 27 | void read(Serial* COM, CArray* returnValue); |
ericbisson | 9:dc81d8ee4a97 | 28 | void setPAN(Serial* COM, short pan_id); |
ericbisson | 9:dc81d8ee4a97 | 29 | |
ericbisson | 9:dc81d8ee4a97 | 30 | #endif // XBEE_H |