|
Lamp-Da 0.1
A compact lantern project
|
Handle the platform specific bluetooth operations. More...
Functions | |
| void | load_bound_file () |
| bool | is_activated () |
| Return true if the bluetooth is activated. | |
| bool | is_advertising () |
| Return true is the bluetooth is visible by other devices. | |
| bool | is_open_to_all () |
| Return true if the device is advertising, and all can connect. | |
| bool | is_connected () |
| Return true if a bluetooth user is connected. | |
| bool | is_bounded () |
| Return true if the bluetooth connection is bounded to a pair. | |
| bool | is_bounded (std::array< uint8_t, 8 > &buffer) |
| void | disconnect () |
| Force disconnection. | |
| bool | is_connection_allowed (uint16_t connectionHandle) |
| If this returns false, do not accept any actions from bluetooth. | |
| void | clear_bounded_devices () |
| Clear the bounded bluetooth devices. | |
| bool | set_bluetooth_name (const std::array< char, MaxBleNameLenght > &name) |
| Set a new name for the bluetooth. | |
| void | start_advertising (bool allowUnknownConnections) |
| start the advertising sequence (with a timeout) | |
| void | stop_bluetooth_advertising () |
| disable the bluetooth advertising, but not the bluetooth | |
| void | write_battery_level (const uint8_t batteryLevel) |
| update battery level | |
| void | notify_battery_level (const uint8_t batteryLevel) |
| notify the connected device of a battery level | |
| bool | was_used () |
| Return tue if the bluetooth was used during lifetime. | |
| void | init () |
| Optional bypass to start the BLE device early, without advertising. | |
| void | shutdown () |
| shutdown the bluetooth and services | |
Variables | |
| static constexpr size_t | MaxBleNameLenght = 32 |
Handle the platform specific bluetooth operations.
| void lampda::hal::bluetooth::start_advertising | ( | bool | allowUnknownConnections | ) |
start the advertising sequence (with a timeout)
| [in] | allowUnknownConnections | If true, allow any device to be connected. If false, it will first check if a saved device exists, and if it's the case will only allow this device to connect. |