upgarded dal 1.4.15
This commit is contained in:
Родитель
f277dc8adc
Коммит
88da53e583
|
@ -1,5 +1,6 @@
|
||||||
// Place your settings in this file to overwrite default and user settings.
|
// Place your settings in this file to overwrite default and user settings.
|
||||||
{
|
{
|
||||||
|
"files.autoSave": "afterDelay",
|
||||||
"editor.formatOnType": true,
|
"editor.formatOnType": true,
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"yotta_modules/**":true,
|
"yotta_modules/**":true,
|
||||||
|
|
|
@ -565,26 +565,12 @@
|
||||||
"args": 1,
|
"args": 1,
|
||||||
"full": "bitvm::bitvm_micro_bit::createReadOnlyImage"
|
"full": "bitvm::bitvm_micro_bit::createReadOnlyImage"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"proto": "StringData* micro_bit::datagramReceive (); ",
|
|
||||||
"name": "micro_bit::datagramReceive",
|
|
||||||
"type": "F",
|
|
||||||
"args": 0,
|
|
||||||
"full": "bitvm::bitvm_micro_bit::datagramReceive"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"proto": "int micro_bit::datagramReceiveNumber (); ",
|
"proto": "int micro_bit::datagramReceiveNumber (); ",
|
||||||
"name": "micro_bit::datagramReceiveNumber",
|
"name": "micro_bit::datagramReceiveNumber",
|
||||||
"type": "F",
|
"type": "F",
|
||||||
"args": 0
|
"args": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"proto": "void micro_bit::datagramSend (StringData* msg); ",
|
|
||||||
"name": "micro_bit::datagramSend",
|
|
||||||
"type": "P",
|
|
||||||
"args": 1,
|
|
||||||
"full": "bitvm::bitvm_micro_bit::datagramSend"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"proto": "void micro_bit::datagramSendNumber (int value); ",
|
"proto": "void micro_bit::datagramSendNumber (int value); ",
|
||||||
"name": "micro_bit::datagramSendNumber",
|
"name": "micro_bit::datagramSendNumber",
|
||||||
|
@ -1607,8 +1593,10 @@
|
||||||
"MICROBIT_ID_THERMOMETER": 28,
|
"MICROBIT_ID_THERMOMETER": 28,
|
||||||
"MICROBIT_ID_RADIO": 29,
|
"MICROBIT_ID_RADIO": 29,
|
||||||
"MICROBIT_ID_RADIO_DATA_READY": 30,
|
"MICROBIT_ID_RADIO_DATA_READY": 30,
|
||||||
"MICROBIT_ID_NOTIFY": 1023,
|
"MICROBIT_ID_MULTIBUTTON_ATTACH": 31,
|
||||||
|
"MICROBIT_ID_MESSAGE_BUS_LISTENER": 1021,
|
||||||
"MICROBIT_ID_NOTIFY_ONE": 1022,
|
"MICROBIT_ID_NOTIFY_ONE": 1022,
|
||||||
|
"MICROBIT_ID_NOTIFY": 1023,
|
||||||
"MICROBIT_STACK_SIZE": 2048,
|
"MICROBIT_STACK_SIZE": 2048,
|
||||||
"MICROBIT_HEAP_BLOCK_SIZE": 4,
|
"MICROBIT_HEAP_BLOCK_SIZE": 4,
|
||||||
"MICROBIT_HEAP_REUSE_SD": 1,
|
"MICROBIT_HEAP_REUSE_SD": 1,
|
||||||
|
@ -1619,6 +1607,7 @@
|
||||||
"MICROBIT_BLE_ENABLED": 1,
|
"MICROBIT_BLE_ENABLED": 1,
|
||||||
"MICROBIT_BLE_PAIRING_MODE": 1,
|
"MICROBIT_BLE_PAIRING_MODE": 1,
|
||||||
"MICROBIT_BLE_PRIVATE_ADDRESSES": 0,
|
"MICROBIT_BLE_PRIVATE_ADDRESSES": 0,
|
||||||
|
"MICROBIT_BLE_OPEN": 0,
|
||||||
"MICROBIT_BLE_WHITELIST": 1,
|
"MICROBIT_BLE_WHITELIST": 1,
|
||||||
"MICROBIT_BLE_ADVERTISING_TIMEOUT": 0,
|
"MICROBIT_BLE_ADVERTISING_TIMEOUT": 0,
|
||||||
"MICROBIT_BLE_DEFAULT_TX_POWER": 0,
|
"MICROBIT_BLE_DEFAULT_TX_POWER": 0,
|
||||||
|
|
|
@ -83,9 +83,7 @@
|
||||||
(uint32_t)(void*)::bitvm::bitvm_micro_bit::createImage, // F1 over {shim:micro_bit::createImage}
|
(uint32_t)(void*)::bitvm::bitvm_micro_bit::createImage, // F1 over {shim:micro_bit::createImage}
|
||||||
(uint32_t)(void*)::bitvm::bitvm_micro_bit::createImageFromString, // F1 over {shim:micro_bit::createImageFromString}
|
(uint32_t)(void*)::bitvm::bitvm_micro_bit::createImageFromString, // F1 over {shim:micro_bit::createImageFromString}
|
||||||
(uint32_t)(void*)::bitvm::bitvm_micro_bit::createReadOnlyImage, // F1 over {shim:micro_bit::createReadOnlyImage}
|
(uint32_t)(void*)::bitvm::bitvm_micro_bit::createReadOnlyImage, // F1 over {shim:micro_bit::createReadOnlyImage}
|
||||||
(uint32_t)(void*)::bitvm::bitvm_micro_bit::datagramReceive, // F0 over {shim:micro_bit::datagramReceive}
|
|
||||||
(uint32_t)(void*)::touch_develop::micro_bit::datagramReceiveNumber, // F0 {shim:micro_bit::datagramReceiveNumber}
|
(uint32_t)(void*)::touch_develop::micro_bit::datagramReceiveNumber, // F0 {shim:micro_bit::datagramReceiveNumber}
|
||||||
(uint32_t)(void*)::bitvm::bitvm_micro_bit::datagramSend, // P1 over {shim:micro_bit::datagramSend}
|
|
||||||
(uint32_t)(void*)::touch_develop::micro_bit::datagramSendNumber, // P1 {shim:micro_bit::datagramSendNumber}
|
(uint32_t)(void*)::touch_develop::micro_bit::datagramSendNumber, // P1 {shim:micro_bit::datagramSendNumber}
|
||||||
(uint32_t)(void*)::touch_develop::micro_bit::datagramSendNumbers, // P4 {shim:micro_bit::datagramSendNumbers}
|
(uint32_t)(void*)::touch_develop::micro_bit::datagramSendNumbers, // P4 {shim:micro_bit::datagramSendNumbers}
|
||||||
(uint32_t)(void*)::touch_develop::micro_bit::devices::alert, // P1 {shim:micro_bit::devices::alert}
|
(uint32_t)(void*)::touch_develop::micro_bit::devices::alert, // P1 {shim:micro_bit::devices::alert}
|
||||||
|
|
|
@ -339,12 +339,7 @@ namespace touch_develop {
|
||||||
|
|
||||||
void broadcastMessage(int message);
|
void broadcastMessage(int message);
|
||||||
|
|
||||||
void onBroadcastMessageReceived(int message, function<void()> f);
|
void onBroadcastMessageReceived(int message, function<void()> f);
|
||||||
|
|
||||||
void datagramSend(ManagedString msg);
|
|
||||||
|
|
||||||
ManagedString datagramReceive();
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// Buttons
|
// Buttons
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
@ -475,8 +470,6 @@ namespace touch_develop {
|
||||||
void datagramSendNumber(int value);
|
void datagramSendNumber(int value);
|
||||||
void datagramSendNumbers(int value0, int value1, int value2, int value3);
|
void datagramSendNumbers(int value0, int value1, int value2, int value3);
|
||||||
int datagramReceiveNumber();
|
int datagramReceiveNumber();
|
||||||
void datagramSend(ManagedString s);
|
|
||||||
ManagedString datagramReceive();
|
|
||||||
void onDatagramReceived(function<void()> f);
|
void onDatagramReceived(function<void()> f);
|
||||||
|
|
||||||
namespace devices {
|
namespace devices {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"microbit-dal": "lancaster-university/microbit-dal#v1.4.14"
|
"microbit-dal": "lancaster-university/microbit-dal#v1.4.15"
|
||||||
},
|
},
|
||||||
"targetDependencies": { },
|
"targetDependencies": { },
|
||||||
"bin": "./source",
|
"bin": "./source",
|
||||||
|
|
|
@ -281,19 +281,7 @@ namespace touch_develop {
|
||||||
uBit.radio.datagram.recv((uint8_t*)datagramBuf, 4);
|
uBit.radio.datagram.recv((uint8_t*)datagramBuf, 4);
|
||||||
return datagramBuf[0];
|
return datagramBuf[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void datagramSend(ManagedString msg) {
|
|
||||||
if (radioEnable() != MICROBIT_OK) return;
|
|
||||||
|
|
||||||
uBit.radio.datagram.send(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
ManagedString datagramReceive() {
|
|
||||||
if (radioEnable() != MICROBIT_OK) return ManagedString("");
|
|
||||||
|
|
||||||
return uBit.radio.datagram.recv();
|
|
||||||
}
|
|
||||||
|
|
||||||
void onDatagramReceived(function<void()> f) {
|
void onDatagramReceived(function<void()> f) {
|
||||||
if (radioEnable() != MICROBIT_OK) return;
|
if (radioEnable() != MICROBIT_OK) return;
|
||||||
|
|
||||||
|
|
|
@ -536,15 +536,7 @@ namespace bitvm {
|
||||||
|
|
||||||
registerWithDal(MES_BROADCAST_GENERAL_ID, message, f);
|
registerWithDal(MES_BROADCAST_GENERAL_ID, message, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void datagramSend(StringData* msg) {
|
|
||||||
::touch_develop::micro_bit::datagramSend(ManagedString(msg));
|
|
||||||
}
|
|
||||||
|
|
||||||
StringData* datagramReceive() {
|
|
||||||
return ::touch_develop::micro_bit::datagramReceive().leakData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void onDatagramReceived(Action f) {
|
void onDatagramReceived(Action f) {
|
||||||
if (f != 0 && ::touch_develop::micro_bit::radioEnable() == MICROBIT_OK) {
|
if (f != 0 && ::touch_develop::micro_bit::radioEnable() == MICROBIT_OK) {
|
||||||
registerWithDal(MICROBIT_ID_RADIO, MICROBIT_RADIO_EVT_DATAGRAM, f);
|
registerWithDal(MICROBIT_ID_RADIO, MICROBIT_RADIO_EVT_DATAGRAM, f);
|
||||||
|
@ -813,9 +805,12 @@ namespace bitvm {
|
||||||
// properly prepends a call to [internal_main].
|
// properly prepends a call to [internal_main].
|
||||||
// ::touch_develop::internal_main();
|
// ::touch_develop::internal_main();
|
||||||
|
|
||||||
//
|
// unique group for radio based on source hash
|
||||||
::touch_develop::micro_bit::radioDefaultGroup = programHash();
|
::touch_develop::micro_bit::radioDefaultGroup = programHash();
|
||||||
|
|
||||||
|
// repeat error 4 times and restart as needed
|
||||||
|
uBit.display.setErrorTimeout(4);
|
||||||
|
|
||||||
uint32_t ver = *pc++;
|
uint32_t ver = *pc++;
|
||||||
checkStr(ver == 0x4207, ":( Bad runtime version");
|
checkStr(ver == 0x4207, ":( Bad runtime version");
|
||||||
numGlobals = *pc++;
|
numGlobals = *pc++;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче