Move from has_* to capabilities bits
This commit is contained in:
@ -29,13 +29,17 @@ typedef bool (*mgos_barometer_mag_create_fn)(struct mgos_barometer *dev);
|
||||
typedef bool (*mgos_barometer_mag_destroy_fn)(struct mgos_barometer *dev);
|
||||
typedef bool (*mgos_barometer_mag_read_fn)(struct mgos_barometer *dev);
|
||||
|
||||
#define MGOS_BAROMETER_CAP_BAROMETER (0x01)
|
||||
#define MGOS_BAROMETER_CAP_THERMOMETER (0x02)
|
||||
#define MGOS_BAROMETER_CAP_HYGROMETER (0x04)
|
||||
|
||||
struct mgos_barometer {
|
||||
struct mgos_i2c * i2c;
|
||||
uint8_t i2caddr;
|
||||
uint16_t cache_ttl_ms;
|
||||
enum mgos_barometer_type type;
|
||||
bool has_thermometer;
|
||||
bool has_barometer;
|
||||
|
||||
uint8_t capabilities;
|
||||
|
||||
mgos_barometer_mag_detect_fn detect;
|
||||
mgos_barometer_mag_create_fn create;
|
||||
|
Reference in New Issue
Block a user