Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Xbee.h@2:33462c1e9f45, 2015-11-22 (annotated)
- Committer:
- Xiaofei
- Date:
- Sun Nov 22 01:24:23 2015 +0000
- Revision:
- 2:33462c1e9f45
- Parent:
- 0:633baa9653b0
- Child:
- 5:d14636b861ff
cmmit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Xiaofei | 0:633baa9653b0 | 1 | #pragma once |
Xiaofei | 0:633baa9653b0 | 2 | #include "mbed.h" |
Xiaofei | 0:633baa9653b0 | 3 | |
Xiaofei | 0:633baa9653b0 | 4 | class Xbee |
Xiaofei | 0:633baa9653b0 | 5 | { |
Xiaofei | 0:633baa9653b0 | 6 | public: |
Xiaofei | 0:633baa9653b0 | 7 | // Use p9 and p10 as default serial pins |
Xiaofei | 2:33462c1e9f45 | 8 | Xbee(PinName tx = p9, PinName rx = p10, PinName rst = p11); |
Xiaofei | 0:633baa9653b0 | 9 | |
Xiaofei | 0:633baa9653b0 | 10 | // Send buffer |
Xiaofei | 0:633baa9653b0 | 11 | void Send(const char*); |
Xiaofei | 0:633baa9653b0 | 12 | |
Xiaofei | 0:633baa9653b0 | 13 | // Read buffer |
Xiaofei | 0:633baa9653b0 | 14 | void Recv(char*,const size_t&); |
Xiaofei | 0:633baa9653b0 | 15 | |
Xiaofei | 0:633baa9653b0 | 16 | private: |
Xiaofei | 0:633baa9653b0 | 17 | Serial _xbee; |
Xiaofei | 2:33462c1e9f45 | 18 | DigitalOut _rst; |
Xiaofei | 0:633baa9653b0 | 19 | }; |