adding bluetooth button service. fix for #106
This commit is contained in:
parent
918d2f1a3a
commit
cf0372aeaa
@ -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);
|
||||
}
|
||||
}
|
||||
|
7
libs/microbit-bluetooth/shims.d.ts
vendored
7
libs/microbit-bluetooth/shims.d.ts
vendored
@ -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.
|
||||
|
@ -630,6 +630,9 @@ namespace pxsim.bluetooth {
|
||||
export function startAccelerometerService(): void {
|
||||
// TODO
|
||||
}
|
||||
export function startButtonService(): void {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
namespace pxsim.images {
|
||||
|
Loading…
Reference in New Issue
Block a user