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
Branch:
develop
Revision:
28:4fd8a894a403
Child:
32:5873d0638277

File content as of revision 28:4fd8a894a403:

/***
 *       _____                         _   
 *      / ____|                       | |  
 *     | (___     ___   _ __     ___  | |_ 
 *      \___ \   / _ \ | '_ \   / _ \ | __|
 *      ____) | |  __/ | | | | |  __/ | |_ 
 *     |_____/   \___| |_| |_|  \___|  \__|
 *         (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()
{
	EBoardStatus status = Board_Fail;

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

	// CBoard::boardPtr = board;

	return ( CBoard::boardPtr->init() );
}