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.
Fork of MicroBitDALImageRewrite by
Diff: MicroBit.cpp
- Revision:
- 0:47d8ba08580f
- Child:
- 1:3e0360107f98
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MicroBit.cpp Sun Apr 12 17:38:56 2015 +0000 @@ -0,0 +1,32 @@ +#include "inc/MicroBit.h" + + +/** + * Device level Message Bus abstraction + */ + +void (*MicroBit::messageBus)(MicroBitEvent *) = NULL; + + + +void MicroBit::init() +{ + +} + + + +/** + * Constructor. + * Create a representation of a MicroBit device. + * @param messageBus callback function to receive MicroBitMessageBus events. + */ +MicroBit::MicroBit(void (*messageBus)(MicroBitEvent *)) : + userLED(MICROBIT_ID_USER_LED, MICROBIT_PIN_USER_LED), + display(MICROBIT_ID_DISPLAY, 5, 5) + +{ + // Just store this for later. + init(); + MicroBit::messageBus = messageBus; +}