feat(ble): expose isInitialized and reclaim memory before radios start
The controller and the WiFi driver each need a large aggregate allocation, which a live app sitting on garbage can deny - that is why a failed connect often succeeded on retry. Both bindings now collect before initializing, and the tree reserves its node and spec capacity so a build does not reallocate into a tight heap.
This commit is contained in:
@@ -19,6 +19,10 @@ function ble.init(name) end
|
||||
---Stops the BLE stack and releases its memory.
|
||||
function ble.deinit() end
|
||||
|
||||
---Whether the BLE stack is running.
|
||||
---@return boolean
|
||||
function ble.isInitialized() end
|
||||
|
||||
---Scans for advertising devices.
|
||||
---@param durationMs? integer Defaults to 3000.
|
||||
---@return BleDevice[]? devices
|
||||
|
||||
Reference in New Issue
Block a user