ohmu
·
2026-10-15
1#pragma once
2
3#include "common/option.h"
4#include "common/percent.h"
5
6// Which radio a device answers on. A dual-mode device answers on both, and a backend that walks only
7// one stack can only report the bit it knows about, so this is a bitfield rather than a value. It
8// carries both meanings the module needs: which stacks a result was seen on, and which stacks
9// `options->showType` asks the detection to walk at all.
10typedef enum FFBluetoothDeviceType: uint8_t {
11 FF_BLUETOOTH_DEVICE_TYPE_NONE = 0,
12 FF_BLUETOOTH_DEVICE_TYPE_CLASSIC_BIT = 1 << 0, // BR/EDR, the BTHENUM enumerator
13 FF_BLUETOOTH_DEVICE_TYPE_LE_BIT = 1 << 1, // Low Energy, the BTHLE enumerator
14 FF_BLUETOOTH_DEVICE_TYPE_BOTH = FF_BLUETOOTH_DEVICE_TYPE_CLASSIC_BIT | FF_BLUETOOTH_DEVICE_TYPE_LE_BIT,
15} FFBluetoothDeviceType;
16
17typedef struct FFBluetoothOptions {
18 FFModuleArgs moduleArgs;
19
20 bool showDisconnected;
21 FFBluetoothDeviceType showType;
22 FFPercentageModuleConfig percent;
23} FFBluetoothOptions;
24
25static_assert(sizeof(FFBluetoothOptions) <= FF_OPTION_MAX_SIZE, "FFBluetoothOptions size exceeds maximum allowed size");