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
Diff: board/board.h
- Branch:
- develop
- Revision:
- 39:022b327d6bf0
- Parent:
- 28:4fd8a894a403
- Child:
- 41:208af6be1869
--- a/board/board.h Tue Aug 29 16:38:13 2017 -0400 +++ b/board/board.h Tue Aug 29 18:05:34 2017 -0400 @@ -15,7 +15,6 @@ #include "mDot.h" extern Serial debugUART; -extern DigitalOut appLED; extern mDot *mDotPtr; enum EBoardState @@ -73,9 +72,11 @@ enum EBoardStatus { Board_Ok, - Board_Fail + Board_Fail, + Board_Invalid }; + EBoardStatus BoardInit(); class CBoard @@ -85,13 +86,16 @@ static EBoardStatus ReadSensors(BoardSensorData &data ) { return ( ( boardPtr != 0 ) ? boardPtr->readSensors( data ) : Board_Fail ); } static EBoardStatus Init() { return ( ( boardPtr != 0 ) ? boardPtr->init( ) : Board_Fail ); } static EBoardStatus Start() { return ( ( boardPtr != 0 ) ? boardPtr->start( ) : Board_Fail ); } + static EBoardStatus SetLED(uint8_t ledNum, bool on) { return ( ( boardPtr != 0 ) ? boardPtr->setLED(ledNum, on ) : Board_Fail ); } + static EBoardStatus ToggleLED(uint8_t ledNum) { return ( ( boardPtr != 0 ) ? boardPtr->toggleLED(ledNum) : Board_Fail ); } protected: virtual EBoardStatus init(); - virtual EBoardStatus readSensors ( BoardSensorData &data ) { return Board_Fail; } virtual EBoardStatus start() { return Board_Ok; } + virtual EBoardStatus setLED(uint8_t ledNum, bool on) { return Board_Fail; } + virtual EBoardStatus toggleLED(uint8_t ledNum) { return Board_Fail; } static CBoard *boardPtr;