MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / isRadioOnOrPending

Function isRadioOnOrPending

Tactility/Source/bluetooth/Bluetooth.cpp:263–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263bool isRadioOnOrPending(Device* dev) {
264 if (!device_is_ready(dev)) return false;
265 BtRadioState state;
266 if (bluetooth_get_radio_state(dev, &state) != ERROR_NONE) return false;
267 return state == BT_RADIO_STATE_ON || state == BT_RADIO_STATE_ON_PENDING;
268}
269
270bool start(Device* dev) {
271 LOGGER.info("Auto-enabling BLE on boot");

Callers 1

onBtToggledFunction · 0.85

Calls 2

device_is_readyFunction · 0.85

Tested by

no test coverage detected