initial commit

This commit is contained in:
2026-08-03 16:09:07 -04:00
commit 95fa512047
109 changed files with 35023 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
---@meta
-- Generated from native/src/bindings/core/ble.cpp. Do not edit.
---@class BleDevice
---@field name string
---@field address string
---@field rssi integer
---@class BleLib
ble = {}
---Starts the BLE stack.
---@param name? string Local device name.
---@return true? ok
---@return string? error
function ble.init(name) end
---Stops the BLE stack and releases its memory.
function ble.deinit() end
---Scans for advertising devices.
---@param durationMs? integer Defaults to 3000.
---@return BleDevice[]? devices
---@return string? error
function ble.scan(durationMs) end
---Connects to a peripheral.
---@param address string
---@return true? ok
---@return string? error
function ble.connect(address) end
---Disconnects from the connected peripheral.
function ble.disconnect() end
---Whether a peripheral is connected.
---@return boolean
function ble.isConnected() end
---Reads a characteristic value.
---@param serviceUuid string
---@param characteristicUuid string
---@return string? value
---@return string? error
function ble.read(serviceUuid, characteristicUuid) end
---Writes a characteristic value.
---@param serviceUuid string
---@param characteristicUuid string
---@param value string
---@return true? ok
---@return string? error
function ble.write(serviceUuid, characteristicUuid, value) end
---Starts advertising.
---@param name? string Advertised device name.
---@return true? ok
---@return string? error
function ble.startAdvertising(name) end
---Stops advertising.
function ble.stopAdvertising() end