Xiaofei Qiu / Xbee
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Xbee.h Source File

Xbee.h

00001 #pragma once
00002 #include "mbed.h"
00003 
00004 /** Xbee class.
00005  *  Author Xiaofei Qiu
00006  */
00007  
00008 class Xbee
00009 {
00010 public:
00011     /** Use p9 and p10 as default serial pins and p11 for reset */
00012     Xbee(PinName tx = p9, PinName rx = p10, PinName rst = p11);
00013     
00014     /** Reset Xbee before use it */
00015     void Reset();
00016     
00017     /** Send 8 bit data */
00018     void Send(const char&);
00019     
00020     /** Read 8 bit data */
00021     void Recv(char&);
00022         
00023 private:
00024     Serial _xbee;
00025     DigitalOut _rst;
00026 };