Simple xbee library based on the Serial class with added reset signaling

Dependents:   m3Dpi

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers xbee.cpp Source File

xbee.cpp

00001 #include "xbee.h"
00002 
00003 
00004 Xbee::Xbee(PinName tx, PinName rx, PinName _reset, const char* name) : Serial(tx, rx, name), rst(_reset)
00005 {
00006     disable();
00007 }
00008 
00009 void Xbee::enable(){
00010     rst = 1;
00011 }
00012 
00013 void Xbee::disable(){
00014     rst = 0;
00015 }
00016 
00017 void Xbee::reset(){
00018     disable();
00019     wait_ms(1);
00020     enable();
00021 }