Microbug / MicroBitDAL_SB2_TEST

Fork of MicroBitDALImageRewrite by Joe Finney

MicroBit.cpp

Committer:
finneyj
Date:
2015-04-12
Revision:
0:47d8ba08580f
Child:
1:3e0360107f98

File content as of revision 0:47d8ba08580f:

#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;
}