added 'microbit-bluetooth' package
This commit is contained in:
1
libs/microbit-bluetooth/README.md
Normal file
1
libs/microbit-bluetooth/README.md
Normal file
@ -0,0 +1 @@
|
||||
# Bluetooth services
|
15
libs/microbit-bluetooth/bluetooth.cpp
Normal file
15
libs/microbit-bluetooth/bluetooth.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "pxt.h"
|
||||
#include "MESEvents.h"
|
||||
|
||||
using namespace pxt;
|
||||
//% color=156 weight=79
|
||||
namespace bluetooth {
|
||||
/**
|
||||
* Starts the Bluetooth IO pin service
|
||||
*/
|
||||
//% help=reference/bluetooth/io-pin-service
|
||||
//% blockid=bluetooth-io-pin-service block="start io pin service"
|
||||
void startIOPinService() {
|
||||
new MicroBitIOPinService(*uBit.ble, uBit.io);
|
||||
}
|
||||
}
|
5
libs/microbit-bluetooth/enums.d.ts
vendored
Normal file
5
libs/microbit-bluetooth/enums.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Auto-generated. Do not edit.
|
||||
declare namespace bluetooth {
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
24
libs/microbit-bluetooth/pxt.json
Normal file
24
libs/microbit-bluetooth/pxt.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "microbit-bluetooth",
|
||||
"description": "Bluetooth services",
|
||||
"files": [
|
||||
"README.md",
|
||||
"enums.d.ts",
|
||||
"shims.d.ts",
|
||||
"bluetooth.cpp"
|
||||
],
|
||||
"public": true,
|
||||
"dependencies": {
|
||||
"microbit": "file:../microbit"
|
||||
},
|
||||
"yotta": {
|
||||
"config": {
|
||||
"microbit-dal": {
|
||||
"bluetooth": {
|
||||
"enabled": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"installedVersion": "prfndw"
|
||||
}
|
16
libs/microbit-bluetooth/shims.d.ts
vendored
Normal file
16
libs/microbit-bluetooth/shims.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
// Auto-generated. Do not edit.
|
||||
|
||||
|
||||
|
||||
//% color=156 weight=79
|
||||
declare namespace bluetooth {
|
||||
|
||||
/**
|
||||
* Starts the Bluetooth IO pin service
|
||||
*/
|
||||
//% help=reference/bluetooth/io-pin-service
|
||||
//% blockid=bluetooth-io-pin-service block="start io pin service" shim=bluetooth::startIOPinService
|
||||
function startIOPinService(): void;
|
||||
}
|
||||
|
||||
// Auto-generated. Do not edit. Really.
|
Reference in New Issue
Block a user