JS: Add typedocs for all extra modules

This commit is contained in:
Willy-JL
2024-11-03 01:44:44 +00:00
parent 6e454582a4
commit c537092367
6 changed files with 310 additions and 1 deletions

View File

@@ -0,0 +1,41 @@
/**
* Module for using the BLE extra beacon
* @version Available with JS feature `blebeacon`
* @module
*/
/**
* @brief Check if the BLE beacon is active
*/
export declare function isActive(): boolean;
/**
* @brief Set BLE beacon configuration
* @param mac The MAC address to use
* @param power The power level to use, in GapAdvPowerLevel scale: 0x00 (-40dBm) to 0x1F (+6dBm)
* @param minInterval Minimum advertisement interval
* @param maxInterval Maximum advertisement interval
*/
export declare function setConfig(mac: Uint8Array, power?: number, minInterval?: number, maxInterval?: number): void;
/**
* @brief Set BLE beacon advertisement data
* @param data The advertisement data to use
*/
export declare function setData(data: Uint8Array): void;
/**
* @brief Start BLE beacon
*/
export declare function start(): void;
/**
* @brief Stop BLE beacon
*/
export declare function stop(): void;
/**
* @brief Set whether the BLE beacon will remain active after the script exits
* @param keep True if BLE beacon should remain active after script exit
*/
export declare function keepAlive(keep: boolean): void;