Add Bluetooth LED service. fix for #111
This commit is contained in:
parent
43c7692a8f
commit
bb20c1780b
@ -2,14 +2,23 @@
|
||||
#include "MESEvents.h"
|
||||
|
||||
using namespace pxt;
|
||||
//% color=#0082FB weight=2
|
||||
//% color=#0082FB weight=20
|
||||
namespace bluetooth {
|
||||
/**
|
||||
* Starts the Bluetooth IO pin service
|
||||
*/
|
||||
//% help=bluetooth/io-pin-service
|
||||
//% blockId=bluetooth-io-pin-service block="bluetooth io pin service"
|
||||
//% help=bluetooth/start-io-pin-service
|
||||
//% blockId=bluetooth_start_io_pin_service block="bluetooth io pin service"
|
||||
void startIOPinService() {
|
||||
new MicroBitIOPinService(*uBit.ble, uBit.io);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the Bluetooth LED service
|
||||
*/
|
||||
//% help=bluetooth/start-led-service
|
||||
//% blockId=bluetooth_start_led_service block="bluetooth led service"
|
||||
void startLEDService() {
|
||||
new MicroBitLEDService(*uBit.ble, uBit.display);
|
||||
}
|
||||
}
|
||||
|
13
libs/microbit-bluetooth/shims.d.ts
vendored
13
libs/microbit-bluetooth/shims.d.ts
vendored
@ -2,15 +2,22 @@
|
||||
|
||||
|
||||
|
||||
//% color=#0082FB weight=2
|
||||
//% color=#0082FB weight=20
|
||||
declare namespace bluetooth {
|
||||
|
||||
/**
|
||||
* Starts the Bluetooth IO pin service
|
||||
*/
|
||||
//% help=bluetooth/io-pin-service
|
||||
//% blockId=bluetooth-io-pin-service block="bluetooth io pin service" shim=bluetooth::startIOPinService
|
||||
//% help=bluetooth/start-io-pin-service
|
||||
//% blockId=bluetooth_start_io_pin_service block="bluetooth io pin service" shim=bluetooth::startIOPinService
|
||||
function startIOPinService(): void;
|
||||
|
||||
/**
|
||||
* Starts the Bluetooth LED service
|
||||
*/
|
||||
//% help=bluetooth/start-led-service
|
||||
//% blockId=bluetooth_start_led_service block="bluetooth led service" shim=bluetooth::startLEDService
|
||||
function startLEDService(): void;
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
||||
|
Loading…
Reference in New Issue
Block a user