mDot AT-Firmware for testing

Dependencies:   MTS-Serial libmDot-mbed5

Fork of Dot-AT-Firmware by MultiTech

Committer:
mfiore
Date:
Thu Jun 25 14:52:56 2015 +0000
Revision:
0:e2b8246361bc
Child:
1:e52ae6584f1c
initial commit, main, debug, version, wakeup, doc

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfiore 0:e2b8246361bc 1 #include "mbed.h"
mfiore 0:e2b8246361bc 2 #include "mDot.h"
mfiore 0:e2b8246361bc 3 #include "CommandTerminal.h"
mfiore 0:e2b8246361bc 4
mfiore 0:e2b8246361bc 5 Serial debug(USBTX, USBRX);
mfiore 0:e2b8246361bc 6
mfiore 0:e2b8246361bc 7 mts::MTSSerial serial(XBEE_DOUT, XBEE_DIN, 512, 512);
mfiore 0:e2b8246361bc 8 DigitalOut led(LED1);
mfiore 0:e2b8246361bc 9 Ticker tick;
mfiore 0:e2b8246361bc 10
mfiore 0:e2b8246361bc 11 void tock() {
mfiore 0:e2b8246361bc 12 led = !led;
mfiore 0:e2b8246361bc 13 }
mfiore 0:e2b8246361bc 14
mfiore 0:e2b8246361bc 15 int main()
mfiore 0:e2b8246361bc 16 {
mfiore 0:e2b8246361bc 17 debug.baud(115200);
mfiore 0:e2b8246361bc 18
mfiore 0:e2b8246361bc 19 tick.attach(&tock, 0.5);
mfiore 0:e2b8246361bc 20
mfiore 0:e2b8246361bc 21 mDot* dot = mDot::getInstance();
mfiore 0:e2b8246361bc 22
mfiore 0:e2b8246361bc 23 debug.baud(dot->getDebugBaud());
mfiore 0:e2b8246361bc 24 serial.baud(dot->getBaud());
mfiore 0:e2b8246361bc 25
mfiore 0:e2b8246361bc 26 CommandTerminal term(serial, dot);
mfiore 0:e2b8246361bc 27
mfiore 0:e2b8246361bc 28 term.start();
mfiore 0:e2b8246361bc 29 }