mbed.org local branch of microbit-dal. The real version lives in git at https://github.com/lancaster-university/microbit-dal

Dependencies:   BLE_API nRF51822 mbed-dev-bin

Dependents:   microbit Microbit IoTChallenge1 microbit ... more

Embed: (wiki syntax)

« Back to documentation index

MicroBitLEDService Class Reference

MicroBitLEDService Class Reference

Class definition for the custom MicroBit LED Service. More...

#include <MicroBitLEDService.h>

Public Member Functions

 MicroBitLEDService (BLEDevice &_ble, MicroBitDisplay &_display)
 Constructor.
void onDataWritten (const GattWriteCallbackParams *params)
 Callback.
void onDataRead (GattReadAuthCallbackParams *params)
 Callback.

Detailed Description

Class definition for the custom MicroBit LED Service.

Provides a BLE service to remotely read and write the state of the LED display.

Definition at line 48 of file MicroBitLEDService.h.


Constructor & Destructor Documentation

MicroBitLEDService ( BLEDevice &  _ble,
MicroBitDisplay _display 
)

Constructor.

Class definition for the custom MicroBit LED Service.

Create a representation of the LEDService

Parameters:
_bleThe instance of a BLE device that we're running on.
_displayAn instance of MicroBitDisplay to interface with.

Provides a BLE service to remotely read and write the state of the LED display. Constructor. Create a representation of the LEDService

Parameters:
_bleThe instance of a BLE device that we're running on.
_displayAn instance of MicroBitDisplay to interface with.

Definition at line 41 of file MicroBitLEDService.cpp.


Member Function Documentation

void onDataRead ( GattReadAuthCallbackParams *  params )

Callback.

Invoked when any of our attributes are read via BLE.

Definition at line 116 of file MicroBitLEDService.cpp.

void onDataWritten ( const GattWriteCallbackParams *  params )

Callback.

Invoked when any of our attributes are written via BLE.

Definition at line 84 of file MicroBitLEDService.cpp.