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@16:cc598ae4ab52, 2015-11-28 (annotated)
- Committer:
- Xiaofei
- Date:
- Sat Nov 28 03:52:44 2015 +0000
- Revision:
- 16:cc598ae4ab52
- Parent:
- 5:d14636b861ff
- Child:
- 17:2271d7a273e7
c
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 | 16:cc598ae4ab52 | 10 | // Reset |
| Xiaofei | 16:cc598ae4ab52 | 11 | void Reset(); |
| Xiaofei | 16:cc598ae4ab52 | 12 | |
| Xiaofei | 0:633baa9653b0 | 13 | // Send buffer |
| Xiaofei | 0:633baa9653b0 | 14 | void Send(const char*); |
| Xiaofei | 0:633baa9653b0 | 15 | |
| Xiaofei | 0:633baa9653b0 | 16 | // Read buffer |
| Xiaofei | 16:cc598ae4ab52 | 17 | void Recv(char*,const size_t& sz = 1); |
| Xiaofei | 5:d14636b861ff | 18 | |
| Xiaofei | 0:633baa9653b0 | 19 | private: |
| Xiaofei | 0:633baa9653b0 | 20 | Serial _xbee; |
| Xiaofei | 2:33462c1e9f45 | 21 | DigitalOut _rst; |
| Xiaofei | 0:633baa9653b0 | 22 | }; |