Basic xdot code to check how many memory is available for user APP after initializing libxdot lorawan stack
Diff: examples/src/auto_ota_example.cpp
- Revision:
- 42:20f6b29a9903
- Parent:
- 39:76f8a75ed3ec
--- a/examples/src/auto_ota_example.cpp Mon May 18 13:12:47 2020 -0500 +++ b/examples/src/auto_ota_example.cpp Tue May 25 09:54:33 2021 -0500 @@ -41,7 +41,7 @@ mDot* dot = NULL; lora::ChannelPlan* plan = NULL; -Serial pc(USBTX, USBRX); +mbed::UnbufferedSerial pc(USBTX, USBRX); #if defined(TARGET_XDOT_L151CC) I2C i2c(I2C_SDA, I2C_SCL); @@ -62,21 +62,8 @@ mts::MTSLog::setLogLevel(mts::MTSLog::TRACE_LEVEL); -#if CHANNEL_PLAN == CP_US915 - plan = new lora::ChannelPlan_US915(); -#elif CHANNEL_PLAN == CP_AU915 - plan = new lora::ChannelPlan_AU915(); -#elif CHANNEL_PLAN == CP_EU868 - plan = new lora::ChannelPlan_EU868(); -#elif CHANNEL_PLAN == CP_KR920 - plan = new lora::ChannelPlan_KR920(); -#elif CHANNEL_PLAN == CP_AS923 - plan = new lora::ChannelPlan_AS923(); -#elif CHANNEL_PLAN == CP_AS923_JAPAN - plan = new lora::ChannelPlan_AS923_Japan(); -#elif CHANNEL_PLAN == CP_IN865 - plan = new lora::ChannelPlan_IN865(); -#endif + // Create channel plan + plan = create_channel_plan(); assert(plan); dot = mDot::getInstance(plan);