Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
bluetooth.h
Go to the documentation of this file.
1
5#ifndef BLUETOOTH_HPP
6#define BLUETOOTH_HPP
7
8#include <stdint.h>
9#include <string>
10
11#include "src/compile.h"
12// - contains #define USE_BLUETOOTH
13
14namespace lampda {
15namespace platform {
17namespace bluetooth {
18
20bool is_activated();
22bool is_advertising();
24bool is_connected();
25
26// start the advertising sequence (with a timeout)
27void start_advertising();
28
29// disable the bluetooth advertising, but not the bluetooth
30void stop_bluetooth_advertising();
31
32// update battery level
33void write_battery_level(const uint8_t batteryLevel);
34void notify_battery_level(const uint8_t batteryLevel);
35
36} // namespace bluetooth
37} // namespace platform
38} // namespace lampda
39
40#endif
Compile definitions and sanity checks.
bool is_advertising()
Return true is the bluetooth is visible by other devices.
Definition: bluetooth.cpp:184
bool is_activated()
Return true if the bluetooth is activated.
Definition: bluetooth.cpp:182
bool is_connected()
Return true if a bluetooth user is connected.
Definition: bluetooth.cpp:186
Program scope.
Definition: control_fixed_modes.hpp:12