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_SPI libmDot-dev-mbed5-deprecated
Fork of Dot-AT-Firmware by
Diff: main.cpp
- Revision:
- 16:d5cf2af81a6d
- Parent:
- 14:f9a77400b622
- Child:
- 18:adc82f3ebaf4
--- a/main.cpp Fri Nov 04 17:04:54 2016 -0500 +++ b/main.cpp Mon Jun 19 14:33:21 2017 -0500 @@ -3,18 +3,41 @@ #include "CommandTerminal.h" #include "ATSerial.h" #include "ATSerialFlowControl.h" +#include "ChannelPlans.h" #define SERIAL_BUFFER_SIZE 512 Serial debug(USBTX, USBRX); +#ifndef CHANNEL_PLAN +#define CHANNEL_PLAN CP_US915 +#endif + #ifndef UNIT_TEST int main() { debug.baud(115200); - mDot* dot = mDot::getInstance(); +#if CHANNEL_PLAN == CP_AS923 + lora::ChannelPlan* plan = new lora::ChannelPlan_AS923(); +#elif CHANNEL_PLAN == CP_US915 + lora::ChannelPlan* plan = new lora::ChannelPlan_US915(); +#elif CHANNEL_PLAN == CP_AU915 + lora::ChannelPlan* plan = new lora::ChannelPlan_AU915(); +#elif CHANNEL_PLAN == CP_EU868 + lora::ChannelPlan* plan = new lora::ChannelPlan_EU868(); +#elif CHANNEL_PLAN == CP_KR920 + lora::ChannelPlan* plan = new lora::ChannelPlan_KR920(); +#elif CHANNEL_PLAN == CP_IN865 + lora::ChannelPlan* plan = new lora::ChannelPlan_IN865(); +#elif CHANNEL_PLAN == CP_AS923_JAPAN + lora::ChannelPlan* plan = new lora::ChannelPlan_AS923_Japan(); +#endif + assert(plan); + + mDot* dot = mDot::getInstance(plan); + assert(dot); // Seed the RNG srand(dot->getRadioRandom());