|
Lamp-Da 0.1
A compact lantern project
|
Usage interface for the bluetooth system. More...
Go to the source code of this file.
Namespaces | |
| namespace | lampda |
| Program scope. | |
| namespace | lampda::bsp |
| Board Support Layer, handle the low level logic above the HAL. | |
| namespace | lampda::bsp::ble |
| Bluetooth high level handling. | |
Functions | |
| void | lampda::bsp::ble::load_bound_file () |
| bool | lampda::bsp::ble::is_activated () |
| Return true if the bluetooth is activated. | |
| bool | lampda::bsp::ble::is_advertising () |
| Return true is the bluetooth is visible by other devices. | |
| bool | lampda::bsp::ble::is_open_to_all () |
| Return true if the device is advertising, and all can connect. | |
| bool | lampda::bsp::ble::is_connected () |
| Return true if a bluetooth user is connected. | |
| bool | lampda::bsp::ble::is_bounded () |
| Return true if the bluetooth connection is bounded to a pair. | |
| bool | lampda::bsp::ble::is_bounded (std::array< uint8_t, 8 > &buffer) |
| void | lampda::bsp::ble::disconnect () |
| bool | lampda::bsp::ble::is_connection_allowed (uint16_t connectionHandle) |
| If this returns false, do not accept any actions from bluetooth. | |
| void | lampda::bsp::ble::clear_bounded_devices () |
| Clear the bounded bluetooth devices. | |
| bool | lampda::bsp::ble::set_bluetooth_name (const std::array< char, MaxBleNameLenght > &name) |
| Set a new name for the bluetooth. | |
| std::array< char, MaxBleNameLenght > | lampda::bsp::ble::get_ble_name () |
| Return the current bluetooth name. | |
| void | lampda::bsp::ble::start_advertising (bool allowUnknownConnections) |
| start the advertising sequence (with a timeout) | |
| void | lampda::bsp::ble::force_pairing_mode () |
| Start the pairing mode (open to all devices), even if a device is connected. The connected device is disconnected first, then the pairing mode starts once the link is closed. | |
| void | lampda::bsp::ble::stop_bluetooth_advertising () |
| disable the bluetooth advertising, but not the bluetooth | |
| void | lampda::bsp::ble::write_battery_level (const uint8_t batteryLevel) |
| update battery level | |
| void | lampda::bsp::ble::notify_battery_level (const uint8_t batteryLevel) |
| notify the connected device of a battery level | |
| bool | lampda::bsp::ble::was_used () |
| Return tue if the bluetooth was used during lifetime. | |
| void | lampda::bsp::ble::init () |
| Optional bypass to start the BLE device early, without advertising. | |
| void | lampda::bsp::ble::shutdown () |
| shutdown the bluetooth and services | |
| bool | lampda::bsp::ble::serial::is_activated () |
| Return true if the serial port is active. | |
| bool | lampda::bsp::ble::serial::is_available () |
| Return true if a char is available to read. | |
| char | lampda::bsp::ble::serial::read () |
| Read a character (blocking) | |
| size_t | lampda::bsp::ble::serial::write (const char *const buffer, size_t bufferSize) |
| Write a buffer to bluetooth serial. | |
| uint16_t | lampda::bsp::ble::serial::mtu_size () |
| Return the usable MTU size. | |
Variables | |
| static constexpr size_t | lampda::bsp::ble::MaxBleNameLenght = 32 |
Usage interface for the bluetooth system.