This mDot firmware will allow USB to directly utilize AT command without the need the use of RS232 DB9 port.
Dependencies: MTS-Serial libmDot mbed-rtos mbed
Fork of mDot_USB_AT_firmware by
Revision 14:eecf7851d6ff, committed 2016-10-19
- Comitter:
- ahario
- Date:
- Wed Oct 19 10:26:54 2016 +0000
- Parent:
- 13:4830e5bf89cc
- Commit message:
- Update from libmDot has overwritten the orginal main.cpp; ; Main.cpp has been updated again to allow AT command to be accessed via USB
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Oct 19 09:43:04 2016 +0000 +++ b/main.cpp Wed Oct 19 10:26:54 2016 +0000 @@ -3,12 +3,8 @@ #include "CommandTerminal.h" #include "ATSerial.h" #include "ATSerialFlowControl.h" - #define SERIAL_BUFFER_SIZE 512 - -mts::ATSerial debug(USBTX, USBRX); - //mts::ATSerial debug(USBTX, USBRX); Serial debug(XBEE_DOUT, XBEE_DIN); @@ -16,37 +12,28 @@ int main() { debug.baud(115200); - mDot* dot = mDot::getInstance(); - // Seed the RNG srand(dot->getRadioRandom()); - //Create pointer to ATSerial class mts::ATSerial* serial; - if (dot->getFlowControl()) //if MDOT_OK set serial to be connected to DB9 pin serial = new mts::ATSerialFlowControl(XBEE_DOUT, XBEE_DIN, XBEE_RTS, XBEE_CTS, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); else - serial = new mts::ATSerial(XBEE_DOUT, XBEE_DIN, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); - //Else if not MDOT_OK set ATSerial class pointer to serial = new mts::ATSerial(USBTX, USBRX, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); debug.baud(dot->getDebugBaud()); serial->baud(dot->getBaud()); - //Create object form CommandTerminal.cpp using constructor //CommandTerminal(mts::ATSerial& serial, mDot* dot) CommandTerminal term(*serial, dot); - term.start(); -} } \ No newline at end of file