|
PebbleOS
|
Start, stop and reset the Bluetooth stack. More...
Enumerations | |
| enum | BtCtlModeOverride { BtCtlModeOverrideNone , BtCtlModeOverrideStop , BtCtlModeOverrideRun } |
| Override of the airplane mode setting. More... | |
Functions | |
| void | bt_ctl_init (void) |
| Initialize Bluetooth control, loading the persisted airplane mode setting. | |
| bool | bt_ctl_is_airplane_mode_on (void) |
| Get the airplane mode setting. | |
| bool | bt_ctl_is_bluetooth_active (void) |
| Check whether the stack is supposed to be running. | |
| bool | bt_ctl_is_bluetooth_running (void) |
| Check whether the stack is up and running. | |
| void | bt_ctl_set_airplane_mode_async (bool enabled) |
| Set and persist airplane mode. | |
| void | bt_ctl_set_enabled (bool enabled) |
| Enable or disable Bluetooth, as requested by the runlevel system. | |
| void | bt_ctl_set_override_mode (BtCtlModeOverride override) |
| Set the airplane mode override. | |
| void | bt_ctl_reset_bluetooth (void) |
| Restart the stack from KernelBG. | |
Start, stop and reset the Bluetooth stack.
| enum BtCtlModeOverride |
| void bt_ctl_init | ( | void | ) |
Initialize Bluetooth control, loading the persisted airplane mode setting.
Must be called before any setter.
| bool bt_ctl_is_airplane_mode_on | ( | void | ) |
Get the airplane mode setting.
| bool bt_ctl_is_bluetooth_active | ( | void | ) |
Check whether the stack is supposed to be running.
It may not actually be running yet, e.g. while starting or resetting.
| bool bt_ctl_is_bluetooth_running | ( | void | ) |
Check whether the stack is up and running.
| void bt_ctl_reset_bluetooth | ( | void | ) |
Restart the stack from KernelBG.
No-op if Bluetooth is not active.
| void bt_ctl_set_airplane_mode_async | ( | bool | enabled | ) |
Set and persist airplane mode.
The stack is started or stopped later from KernelBG.
| enabled | True to turn airplane mode on. |
| void bt_ctl_set_enabled | ( | bool | enabled | ) |
Enable or disable Bluetooth, as requested by the runlevel system.
Starts or stops the stack synchronously as needed.
| enabled | True to enable. |
| void bt_ctl_set_override_mode | ( | BtCtlModeOverride | override | ) |
Set the airplane mode override.
Starts or stops the stack synchronously as needed.
| override | New override mode. |