checking in

This commit is contained in:
Martin Woolley
2016-06-23 08:05:49 +01:00
parent 2629192bdb
commit 82e34d852c
2 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#include "pxt.h"
#include "MESEvents.h"
#include "MicroBitUARTService.h"
MicroBitUARTService *uart;
using namespace pxt;
//% color=#0082FB weight=20
@ -77,6 +79,16 @@ namespace bluetooth {
void onBluetoothDisconnected(Action body) {
registerWithDal(MICROBIT_ID_BLE, MICROBIT_BLE_EVT_DISCONNECTED, body);
}
/**
* Starts the Bluetooth UART service
*/
//% help=bluetooth/start-uart-service
//% blockId=bluetooth_start_uart_service block="bluetooth|uart|service" blockGap=8
void startUartService() {
// 32 octet buffer size is
uart = new MicroBitUARTService(*uBit.ble, 32, 32);
}
}