mdot UDK & STMicro MEMS Shield Sensor packet example

Dependencies:   libmDot-mbed5 DOGS102 ISL29011 MMA845x MPL3115A2 NCP5623B X_NUCLEO_IKS01A1 Senet_Packet

Fork of MTDOT-UDKDemo_Senet by canuck lehead

board/board.cpp

Committer:
Shaun Nelson
Date:
2017-08-25
Revision:
32:5873d0638277
Parent:
28:4fd8a894a403
Child:
39:022b327d6bf0

File content as of revision 32:5873d0638277:

/***
 *       _____                         _   
 *      / ____|                       | |  
 *     | (___     ___   _ __     ___  | |_ 
 *      \___ \   / _ \ | '_ \   / _ \ | __|
 *      ____) | |  __/ | | | | |  __/ | |_ 
 *     |_____/   \___| |_| |_|  \___|  \__|
 *         (C) 2016 Senet, Inc                                
 *                                         
 */
#include "board_udk.h"
#include "board_evb.h"
#include "ChannelPlans.h"

CBoard* CBoard::boardPtr = 0;
mDot           *mDotPtr  = 0;
DigitalOut      appLED(PA_0);


EBoardStatus CBoard::init()
{
	lora::ChannelPlan* plan = new lora::ChannelPlan_US915();
	assert(plan);

	mDotPtr = mDot::getInstance(plan);
	assert(mDotPtr);

	debugUART.baud(115200);

	return Board_Ok;
}


EBoardStatus BoardInit()
{
#ifdef MTDOT_UDK
	new CBoardUDK();
#elif MTDOT_EVB
	new CBoardEVB();
#else
#error Need to define board type ( MTDOT_UDK or MTDOT_EVB)
#endif

	return ( ( CBoard::boardPtr != 0 ) ? CBoard::boardPtr->init() : Board_Fail);
}