![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
AT terminal for the mDot using the USB debug port instead of the serial port.
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
Revision 18:f5d28d621bb0, committed 2018-03-02
- Comitter:
- pferland
- Date:
- Fri Mar 02 20:01:38 2018 +0000
- Parent:
- 17:95c9eb69329a
- Commit message:
- Added ability to force the AT terminal to use the USB debug port
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libmDot-mbed5.lib Fri Mar 02 20:01:38 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/teams/MultiTech/code/libmDot-mbed5/#255e2ddc294e
--- a/main.cpp Mon Jun 19 15:54:03 2017 -0500 +++ b/main.cpp Fri Mar 02 20:01:38 2018 +0000 @@ -6,6 +6,7 @@ #include "ChannelPlans.h" #define SERIAL_BUFFER_SIZE 512 +#define USE_USB_SERIAL Serial debug(USBTX, USBRX); @@ -44,19 +45,28 @@ mts::ATSerial* serial; - if (dot->getFlowControl()) -#if defined(TARGET_MTS_MDOT_F411RE) + if (dot->getFlowControl()){ +#if defined(TARGET_MTS_MDOT_F411RE) && defined(USE_USB_SERIAL) + //no flow control available on USB debug port + dot->setFlowControl(false); + serial = new mts::ATSerial(USBTX, USBRX, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); + +#elif defined(TARGET_MTS_MDOT_F411RE) serial = new mts::ATSerialFlowControl(XBEE_DOUT, XBEE_DIN, XBEE_RTS, XBEE_CTS, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); #else serial = new mts::ATSerialFlowControl(UART1_TX, UART1_RX, UART1_RTS, UART1_CTS, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); #endif - else -#if defined(TARGET_MTS_MDOT_F411RE) + } else { +#if defined(TARGET_MTS_MDOT_F411RE) && defined(USE_USB_SERIAL) + serial = new mts::ATSerial(USBTX, USBRX, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); + +#elif defined(TARGET_MTS_MDOT_F411RE) serial = new mts::ATSerial(XBEE_DOUT, XBEE_DIN, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); #else serial = new mts::ATSerial(UART1_TX, UART1_RX, SERIAL_BUFFER_SIZE, SERIAL_BUFFER_SIZE); #endif - + } + debug.baud(dot->getDebugBaud()); serial->baud(dot->getBaud());
--- a/mbed-os.lib Mon Jun 19 15:54:03 2017 -0500 +++ b/mbed-os.lib Fri Mar 02 20:01:38 2018 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#a6f3fd1a60d5df59246d7caf3f108c4d34e1808e +https://github.com/ARMmbed/mbed-os/#fc1836545dcc2fc86f03b01292b62bf2089f67c3