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.
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_USB_AT_firmware by
main.cpp
00001 #include "mbed.h" 00002 #include "mDot.h" 00003 #include "CommandTerminal.h" 00004 #include "ATSerial.h" 00005 #include "ATSerialFlowControl.h" 00006 00007 #define SERIAL_BUFFER_SIZE 512 00008 00009 //mts::ATSerial debug(USBTX, USBRX); 00010 Serial debug(XBEE_DOUT, XBEE_DIN); 00011 00012 int main() 00013 { 00014 debug.baud(115200); 00015 00016 mDot* dot = mDot::getInstance(); 00017 00018 // Seed the RNG 00019 srand(dot->getRadioRandom()); 00020 00021 //Create pointer to ATSerial class 00022 mts::ATSerial* serial; 00023 00024 if (dot->getFlowControl()) 00025 //if MDOT_OK set serial to be connected to DB9 pin 00026 serial = new mts::ATSerialFlowControl(XBEE_DOUT, XBEE_DIN, XBEE_RTS, XBEE_CTS, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); 00027 else 00028 //Else if not MDOT_OK set ATSerial class pointer to 00029 serial = new mts::ATSerial(USBTX, USBRX, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); 00030 00031 debug.baud(dot->getDebugBaud()); 00032 serial->baud(dot->getBaud()); 00033 00034 //Create object form CommandTerminal.cpp using constructor 00035 //CommandTerminal(mts::ATSerial& serial, mDot* dot) 00036 CommandTerminal term(*serial, dot); 00037 00038 term.start(); 00039 }
Generated on Tue Jul 12 2022 20:37:29 by
1.7.2
