expose device serial number in javascript
This commit is contained in:
parent
53bfea5752
commit
cef1f57e30
@ -163,4 +163,12 @@ namespace control {
|
|||||||
StringData* deviceName() {
|
StringData* deviceName() {
|
||||||
return ManagedString(microbit_friendly_name()).leakData();
|
return ManagedString(microbit_friendly_name()).leakData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Derive a unique, consistent serial number of this device from internal data.
|
||||||
|
*/
|
||||||
|
//%
|
||||||
|
int deviceSerialNumber() {
|
||||||
|
return microbit_serial_number();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user