Add Bluetooth LED service. fix for #111
This commit is contained in:
parent
43c7692a8f
commit
bb20c1780b
@ -2,14 +2,23 @@
|
|||||||
#include "MESEvents.h"
|
#include "MESEvents.h"
|
||||||
|
|
||||||
using namespace pxt;
|
using namespace pxt;
|
||||||
//% color=#0082FB weight=2
|
//% color=#0082FB weight=20
|
||||||
namespace bluetooth {
|
namespace bluetooth {
|
||||||
/**
|
/**
|
||||||
* Starts the Bluetooth IO pin service
|
* Starts the Bluetooth IO pin service
|
||||||
*/
|
*/
|
||||||
//% help=bluetooth/io-pin-service
|
//% help=bluetooth/start-io-pin-service
|
||||||
//% blockId=bluetooth-io-pin-service block="bluetooth io pin service"
|
//% blockId=bluetooth_start_io_pin_service block="bluetooth io pin service"
|
||||||
void startIOPinService() {
|
void startIOPinService() {
|
||||||
new MicroBitIOPinService(*uBit.ble, uBit.io);
|
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 {
|
declare namespace bluetooth {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the Bluetooth IO pin service
|
* Starts the Bluetooth IO pin service
|
||||||
*/
|
*/
|
||||||
//% help=bluetooth/io-pin-service
|
//% help=bluetooth/start-io-pin-service
|
||||||
//% blockId=bluetooth-io-pin-service block="bluetooth io pin service" shim=bluetooth::startIOPinService
|
//% blockId=bluetooth_start_io_pin_service block="bluetooth io pin service" shim=bluetooth::startIOPinService
|
||||||
function startIOPinService(): void;
|
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.
|
// Auto-generated. Do not edit. Really.
|
||||||
|
Loading…
Reference in New Issue
Block a user