adding bluetooth button service. fix for #106

This commit is contained in:
Peli de Halleux 2016-06-14 13:53:05 -07:00
parent 918d2f1a3a
commit cf0372aeaa
3 changed files with 19 additions and 0 deletions

View File

@ -48,4 +48,13 @@ namespace bluetooth {
void startAccelerometerService() {
new MicroBitAccelerometerService(*uBit.ble, uBit.accelerometer);
}
/**
* Starts the button service
*/
//% help=bluetooth/start-button-service
//% blockId=bluetooth_start_button_service block="bluetooth button service" blockGap=8
void startButtonService() {
new MicroBitButtonService(*uBit.ble);
}
}

View File

@ -39,6 +39,13 @@ declare namespace bluetooth {
//% help=bluetooth/start-accelerometer-service
//% blockId=bluetooth_start_accelerometer_service block="bluetooth accelerometer service" blockGap=8 shim=bluetooth::startAccelerometerService
function startAccelerometerService(): void;
/**
* Starts the button service
*/
//% help=bluetooth/start-button-service
//% blockId=bluetooth_start_button_service block="bluetooth button service" blockGap=8 shim=bluetooth::startButtonService
function startButtonService(): void;
}
// Auto-generated. Do not edit. Really.

View File

@ -630,6 +630,9 @@ namespace pxsim.bluetooth {
export function startAccelerometerService(): void {
// TODO
}
export function startButtonService(): void {
// TODO
}
}
namespace pxsim.images {