From e65b16474e97e5777f7b17c9c256ef2ca913f5b7 Mon Sep 17 00:00:00 2001 From: Peli Date: Sun, 19 Jan 2020 21:38:01 -0800 Subject: [PATCH] shims --- libs/base/shims.d.ts | 6 ++++++ libs/core/shims.d.ts | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/libs/base/shims.d.ts b/libs/base/shims.d.ts index ece391a3..d54c32f0 100644 --- a/libs/base/shims.d.ts +++ b/libs/base/shims.d.ts @@ -10,6 +10,12 @@ declare interface Buffer { //% shim=BufferMethods::getUint8 getUint8(off: int32): int32; + /** + * Returns false when the buffer can be written to. + */ + //% shim=BufferMethods::isReadOnly + isReadOnly(): boolean; + /** * Writes an unsigned byte at a particular location */ diff --git a/libs/core/shims.d.ts b/libs/core/shims.d.ts index 23fccb50..de88d881 100644 --- a/libs/core/shims.d.ts +++ b/libs/core/shims.d.ts @@ -65,6 +65,13 @@ declare namespace control { //% help=control/allocate-notify-event shim=control::allocateNotifyEvent function allocateNotifyEvent(): int32; + /** + * Determine the version of system software currently running. + */ + //% blockId="control_device_dal_version" block="device dal version" + //% help=control/device-dal-version shim=control::deviceDalVersion + function deviceDalVersion(): string; + /** Write data to DMESG debugging buffer. */ //% shim=control::dmesg function dmesg(s: string): void;