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

MicroBitIOPinService Class Reference

MicroBitIOPinService Class Reference

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

#include <MicroBitIOPinService.h>

Inherits MicroBitComponent.

Public Member Functions

 MicroBitIOPinService (BLEDevice &_ble, MicroBitIO &_io)
 Constructor.
virtual void idleTick ()
 Periodic callback from MicroBit scheduler.
virtual void systemTick ()
 The system timer will call this member function once the component has been added to the array of system components using system_timer_add_component.

Detailed Description

Class definition for the custom MicroBit IOPin Service.

Provides a BLE service to remotely read the state of the I/O Pin, and configure its behaviour.

Definition at line 56 of file MicroBitIOPinService.h.


Constructor & Destructor Documentation

MicroBitIOPinService ( BLEDevice &  _ble,
MicroBitIO _io 
)

Constructor.

Class definition for the custom MicroBit IOPin Service.

Create a representation of the IOPinService

Parameters:
_bleThe instance of a BLE device that we're running on.
_ioAn instance of MicroBitIO that this service will use to perform I/O operations.

Provides a BLE service to remotely read the state of the I/O Pin, and configure its behaviour. Constructor. Create a representation of the IOPinService

Parameters:
_bleThe instance of a BLE device that we're running on.
_ioAn instance of MicroBitIO that this service will use to perform I/O operations.

Definition at line 43 of file MicroBitIOPinService.cpp.


Member Function Documentation

void idleTick (  ) [virtual]

Periodic callback from MicroBit scheduler.

Check if any of the pins we're watching need updating. Notify any connected device with any changes.

Reimplemented from MicroBitComponent.

Definition at line 249 of file MicroBitIOPinService.cpp.

virtual void systemTick (  ) [virtual, inherited]

The system timer will call this member function once the component has been added to the array of system components using system_timer_add_component.

This callback will be in interrupt context.

Reimplemented in MicroBitSystemTimerCallback, MicroBitButton, and MicroBitDisplay.

Definition at line 125 of file MicroBitComponent.h.