update bluetooth for eddystone

This commit is contained in:
Matthias L. Jugel
2017-09-19 23:54:46 +02:00
parent 25c3a60166
commit 3fc7888aab
7 changed files with 228 additions and 8 deletions

View File

@ -169,11 +169,14 @@ namespace pxsim.bluetooth {
// TODO
}
export function uartWrite(s : string): void {
// TODO
serial.writeString(s)
}
export function uartReadUntil(del: string): string {
// TODO
return ""
return serial.readUntil(del);
}
export function onDataReceived(delimiters: string, handler: RefAction) {
let b = board();
b.bus.listen(DAL.MICROBIT_ID_BLE_UART, DAL.MICROBIT_UART_S_EVT_DELIM_MATCH, handler);
}
export function onBluetoothConnected(a : RefAction) {
// TODO
@ -181,5 +184,9 @@ namespace pxsim.bluetooth {
export function onBluetoothDisconnected(a : RefAction) {
// TODO
}
export function advertiseUrl(url: string, power: number, connectable: boolean) { }
export function advertiseUidBuffer(nsAndInstance: Buffer, power: number, connectable: boolean) { }
export function stopAdvertising() { }
export function setTransmitPower(power: number) {}
}