Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_tag_lux_meter.h
1 #ifndef _BC_TAG_LUX_METER_H
2 #define _BC_TAG_LUX_METER_H
3 
4 #include <bc_opt3001.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
21 
23 
24 typedef enum
25 {
28 
31 
33 
35 
37 
42 
44 
49 
50 void bc_tag_lux_meter_set_event_handler(bc_tag_lux_meter_t *self, void (*event_handler)(bc_tag_lux_meter_t *, bc_tag_lux_meter_event_t, void *), void *event_param);
51 
55 
57 
62 
64 
70 
72 
78 
80 
82 
83 #endif // _BC_TAG_LUX_METER_H
uint64_t bc_tick_t
Timestamp data type.
Definition: bc_tick.h:16
bool bc_tag_lux_meter_measure(bc_tag_lux_meter_t *self)
Start measurement manually.
void bc_tag_lux_meter_init(bc_tag_lux_meter_t *self, bc_i2c_channel_t i2c_channel, bc_tag_lux_meter_i2c_address_t i2c_address)
Initialize BigClown Lux Meter Tag.
bool bc_tag_lux_meter_get_illuminance_raw(bc_tag_lux_meter_t *self, uint16_t *raw)
Get measured illuminance as raw value.
bc_tag_lux_meter_event_t
Callback events.
bc_tag_lux_meter_i2c_address_t
I2C address.
bc_opt3001_t bc_tag_lux_meter_t
BigClown Lux Meter Tag instance.
void bc_tag_lux_meter_set_event_handler(bc_tag_lux_meter_t *self, void(*event_handler)(bc_tag_lux_meter_t *, bc_tag_lux_meter_event_t, void *), void *event_param)
Set callback function.
Error event.
Definition: bc_opt3001.h:16
bc_i2c_channel_t
I2C channels.
Definition: bc_i2c.h:15
struct bc_opt3001_t bc_opt3001_t
OPT3001 instance.
Definition: bc_opt3001.h:25
bool bc_tag_lux_meter_get_illuminance_lux(bc_tag_lux_meter_t *self, float *lux)
Get measured illuminance in lux.
Update event.
Definition: bc_opt3001.h:19
void bc_tag_lux_meter_set_update_interval(bc_tag_lux_meter_t *self, bc_tick_t interval)
Set measurement interval.