![]() |
LibDriver BH1750FVI
1.0.0
BH1750FVI full-featured driver
|
bh1750fvi basic driver modules More...
Data Structures | |
struct | bh1750fvi_handle_s |
bh1750fvi handle structure definition More... | |
struct | bh1750fvi_info_s |
bh1750fvi information structure definition More... | |
Typedefs | |
typedef struct bh1750fvi_handle_s | bh1750fvi_handle_t |
bh1750fvi handle structure definition More... | |
typedef struct bh1750fvi_info_s | bh1750fvi_info_t |
bh1750fvi information structure definition More... | |
Enumerations | |
enum | bh1750fvi_address_t { BH1750FVI_ADDRESS_LOW = 0x46 , BH1750FVI_ADDRESS_HIGH = 0xB8 } |
bh1750fvi address enumeration definition More... | |
enum | bh1750fvi_mode_t { BH1750FVI_MODE_HIGH_RESOLUTION_MODE = 0x0 , BH1750FVI_MODE_HIGH_RESOLUTION_MODE2 = 0x1 , BH1750FVI_MODE_LOW_RESOLUTION_MODE = 0x2 } |
bh1750fvi mode enumeration definition More... | |
bh1750fvi basic driver modules
typedef struct bh1750fvi_handle_s bh1750fvi_handle_t |
bh1750fvi handle structure definition
typedef struct bh1750fvi_info_s bh1750fvi_info_t |
bh1750fvi information structure definition
enum bh1750fvi_address_t |
bh1750fvi address enumeration definition
Enumerator | |
---|---|
BH1750FVI_ADDRESS_LOW | addr low |
BH1750FVI_ADDRESS_HIGH | addr high |
Definition at line 62 of file driver_bh1750fvi.h.
enum bh1750fvi_mode_t |
bh1750fvi mode enumeration definition
Enumerator | |
---|---|
BH1750FVI_MODE_HIGH_RESOLUTION_MODE | 1lx resolution |
BH1750FVI_MODE_HIGH_RESOLUTION_MODE2 | 0.5lx resolution |
BH1750FVI_MODE_LOW_RESOLUTION_MODE | 4lx resolution |
Definition at line 71 of file driver_bh1750fvi.h.
uint8_t bh1750fvi_continuous_read | ( | bh1750fvi_handle_t * | handle, |
uint16_t * | raw, | ||
float * | lux | ||
) |
read data from the chip continuously
[in] | *handle | pointer to a bh1750fvi handle structure |
[out] | *raw | pointer to a raw lux buffer |
[out] | *lux | pointer to a converted lux buffer |
Definition at line 620 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_deinit | ( | bh1750fvi_handle_t * | handle | ) |
close the chip
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 322 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_get_addr_pin | ( | bh1750fvi_handle_t * | handle, |
bh1750fvi_address_t * | addr_pin | ||
) |
get the address pin
[in] | *handle | pointer to a bh1750fvi handle structure |
[out] | *addr_pin | pointer to a chip address pins buffer |
Definition at line 140 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_get_mode | ( | bh1750fvi_handle_t * | handle, |
bh1750fvi_mode_t * | mode | ||
) |
get the mode
[in] | *handle | pointer to a bh1750fvi handle structure |
[out] | *mode | pointer to a mode buffer |
Definition at line 188 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_info | ( | bh1750fvi_info_t * | info | ) |
get chip's information
[out] | *info | pointer to a bh1750fvi info structure |
Definition at line 828 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_init | ( | bh1750fvi_handle_t * | handle | ) |
initialize the chip
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 216 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_power_down | ( | bh1750fvi_handle_t * | handle | ) |
power down
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 366 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_power_on | ( | bh1750fvi_handle_t * | handle | ) |
power on
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 402 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_reset | ( | bh1750fvi_handle_t * | handle | ) |
reset
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 438 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_set_addr_pin | ( | bh1750fvi_handle_t * | handle, |
bh1750fvi_address_t | addr_pin | ||
) |
set the address pin
[in] | *handle | pointer to a bh1750fvi handle structure |
[in] | addr_pin | chip address pins |
Definition at line 119 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_set_measurement_time | ( | bh1750fvi_handle_t * | handle, |
uint8_t | t | ||
) |
set the measurement time
[in] | *handle | pointer to a bh1750fvi handle structure |
[in] | t | measurement time |
Definition at line 476 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_set_mode | ( | bh1750fvi_handle_t * | handle, |
bh1750fvi_mode_t | mode | ||
) |
set the mode
[in] | *handle | pointer to a bh1750fvi handle structure |
[in] | mode | chip mode |
Definition at line 162 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_single_read | ( | bh1750fvi_handle_t * | handle, |
uint16_t * | raw, | ||
float * | lux | ||
) |
read data from the chip once
[in] | *handle | pointer to a bh1750fvi handle structure |
[out] | *raw | pointer to a raw lux buffer |
[out] | *lux | pointer to a converted lux buffer |
Definition at line 530 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_start_continuous_read | ( | bh1750fvi_handle_t * | handle | ) |
start chip reading
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 669 of file driver_bh1750fvi.c.
uint8_t bh1750fvi_stop_continuous_read | ( | bh1750fvi_handle_t * | handle | ) |
stop chip reading
[in] | *handle | pointer to a bh1750fvi handle structure |
Definition at line 724 of file driver_bh1750fvi.c.