parent
cc06e91c25
commit
28b5b293b5
@ -18,14 +18,18 @@ extern "C" void target_reset() {
|
|||||||
microbit_reset();
|
microbit_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t device_heap_size(uint8_t heap_index); // defined in microbit-dal
|
||||||
|
|
||||||
namespace pxt {
|
namespace pxt {
|
||||||
|
|
||||||
MicroBit uBit;
|
MicroBit uBit;
|
||||||
MicroBitEvent lastEvent;
|
MicroBitEvent lastEvent;
|
||||||
|
|
||||||
void platform_init() {
|
void platform_init() {
|
||||||
microbit_seed_random();
|
microbit_seed_random();
|
||||||
seedRandom(microbit_random(0x7fffffff));
|
seedRandom(microbit_random(0x7fffffff));
|
||||||
|
if (device_heap_size(1))
|
||||||
|
gcPreAllocateBlock(device_heap_size(1) - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void platform_init();
|
void platform_init();
|
||||||
|
@ -14,6 +14,8 @@ void debuglog(const char *format, ...);
|
|||||||
#define xmalloc malloc
|
#define xmalloc malloc
|
||||||
#define xfree free
|
#define xfree free
|
||||||
|
|
||||||
|
#define GC_MAX_ALLOC_SIZE 9000
|
||||||
|
|
||||||
#if CONFIG_ENABLED(MICROBIT_BLE_ENABLED)
|
#if CONFIG_ENABLED(MICROBIT_BLE_ENABLED)
|
||||||
#define GC_BLOCK_SIZE 256
|
#define GC_BLOCK_SIZE 256
|
||||||
#else
|
#else
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
"@types/web-bluetooth": "0.0.4"
|
"@types/web-bluetooth": "0.0.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-common-packages": "6.9.3",
|
"pxt-common-packages": "6.9.4",
|
||||||
"pxt-core": "5.15.10"
|
"pxt-core": "5.15.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user