![]() |
LibDriver BH1750FVI
1.0.0
BH1750FVI full-featured driver
|
driver bh1750fvi source file More...
#include "driver_bh1750fvi.h"
Go to the source code of this file.
Macros | |
#define | CHIP_NAME "ROHM BH1750FVI" |
chip information definition More... | |
#define | MANUFACTURER_NAME "ROHM" |
#define | SUPPLY_VOLTAGE_MIN 2.4f |
#define | SUPPLY_VOLTAGE_MAX 3.6f |
#define | MAX_CURRENT 0.19f |
#define | TEMPERATURE_MIN -40.0f |
#define | TEMPERATURE_MAX 85.0f |
#define | DRIVER_VERSION 1000 |
#define | BH1750FVI_COMMAND_POWER_DOWN 0x00 |
chip command definition More... | |
#define | BH1750FVI_COMMAND_POWER_ON 0x01 |
#define | BH1750FVI_COMMAND_RESET 0x07 |
#define | BH1750FVI_COMMAND_CONTINUOUSLY_H_RESOLUTION_MODE 0x10 |
#define | BH1750FVI_COMMAND_CONTINUOUSLY_H_RESOLUTION_MODE2 0x11 |
#define | BH1750FVI_COMMAND_CONTINUOUSLY_L_RESOLUTION_MODE 0x13 |
#define | BH1750FVI_COMMAND_ONE_TIME_H_RESOLUTION_MODE 0x20 |
#define | BH1750FVI_COMMAND_ONE_TIME_H_RESOLUTION_MODE2 0x21 |
#define | BH1750FVI_COMMAND_ONE_TIME_L_RESOLUTION_MODE 0x23 |
#define | BH1750FVI_COMMAND_CHANGE_MEASUREMENT_TIME_HIGH 0x40 |
#define | BH1750FVI_COMMAND_CHANGE_MEASUREMENT_TIME_LOW 0x60 |
Functions | |
uint8_t | bh1750fvi_set_addr_pin (bh1750fvi_handle_t *handle, bh1750fvi_address_t addr_pin) |
set the address pin More... | |
uint8_t | bh1750fvi_get_addr_pin (bh1750fvi_handle_t *handle, bh1750fvi_address_t *addr_pin) |
get the address pin More... | |
uint8_t | bh1750fvi_set_mode (bh1750fvi_handle_t *handle, bh1750fvi_mode_t mode) |
set the mode More... | |
uint8_t | bh1750fvi_get_mode (bh1750fvi_handle_t *handle, bh1750fvi_mode_t *mode) |
get the mode More... | |
uint8_t | bh1750fvi_init (bh1750fvi_handle_t *handle) |
initialize the chip More... | |
uint8_t | bh1750fvi_deinit (bh1750fvi_handle_t *handle) |
close the chip More... | |
uint8_t | bh1750fvi_power_down (bh1750fvi_handle_t *handle) |
power down More... | |
uint8_t | bh1750fvi_power_on (bh1750fvi_handle_t *handle) |
power on More... | |
uint8_t | bh1750fvi_reset (bh1750fvi_handle_t *handle) |
reset More... | |
uint8_t | bh1750fvi_set_measurement_time (bh1750fvi_handle_t *handle, uint8_t t) |
set the measurement time More... | |
uint8_t | bh1750fvi_single_read (bh1750fvi_handle_t *handle, uint16_t *raw, float *lux) |
read data from the chip once More... | |
uint8_t | bh1750fvi_continuous_read (bh1750fvi_handle_t *handle, uint16_t *raw, float *lux) |
read data from the chip continuously More... | |
uint8_t | bh1750fvi_start_continuous_read (bh1750fvi_handle_t *handle) |
start chip reading More... | |
uint8_t | bh1750fvi_stop_continuous_read (bh1750fvi_handle_t *handle) |
stop chip reading More... | |
uint8_t | bh1750fvi_set_reg (bh1750fvi_handle_t *handle, uint8_t *buf, uint16_t len) |
set the chip register More... | |
uint8_t | bh1750fvi_get_reg (bh1750fvi_handle_t *handle, uint8_t *buf, uint16_t len) |
get the chip register More... | |
uint8_t | bh1750fvi_info (bh1750fvi_info_t *info) |
get chip's information More... | |
driver bh1750fvi source file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Date | Version | Author | Description |
---|---|---|---|
2022/11/30 | 1.0 | Shifeng Li | first upload |
Definition in file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_CHANGE_MEASUREMENT_TIME_HIGH 0x40 |
change measurement time high command
Definition at line 63 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_CHANGE_MEASUREMENT_TIME_LOW 0x60 |
change measurement time low command
Definition at line 64 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_CONTINUOUSLY_H_RESOLUTION_MODE 0x10 |
continuously h-resolution mode command
Definition at line 57 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_CONTINUOUSLY_H_RESOLUTION_MODE2 0x11 |
continuously h-resolution mode2 command
Definition at line 58 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_CONTINUOUSLY_L_RESOLUTION_MODE 0x13 |
continuously l-resolution mode command
Definition at line 59 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_ONE_TIME_H_RESOLUTION_MODE 0x20 |
one time h-resolution mode command
Definition at line 60 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_ONE_TIME_H_RESOLUTION_MODE2 0x21 |
one time h-resolution mode2 command
Definition at line 61 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_ONE_TIME_L_RESOLUTION_MODE 0x23 |
one time l-resolution mode command
Definition at line 62 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_POWER_DOWN 0x00 |
#define BH1750FVI_COMMAND_POWER_ON 0x01 |
power on command
Definition at line 55 of file driver_bh1750fvi.c.
#define BH1750FVI_COMMAND_RESET 0x07 |
reset command
Definition at line 56 of file driver_bh1750fvi.c.
#define CHIP_NAME "ROHM BH1750FVI" |
#define DRIVER_VERSION 1000 |
driver version
Definition at line 49 of file driver_bh1750fvi.c.
#define MANUFACTURER_NAME "ROHM" |
manufacturer name
Definition at line 43 of file driver_bh1750fvi.c.
#define MAX_CURRENT 0.19f |
chip max current
Definition at line 46 of file driver_bh1750fvi.c.
#define SUPPLY_VOLTAGE_MAX 3.6f |
chip max supply voltage
Definition at line 45 of file driver_bh1750fvi.c.
#define SUPPLY_VOLTAGE_MIN 2.4f |
chip min supply voltage
Definition at line 44 of file driver_bh1750fvi.c.
#define TEMPERATURE_MAX 85.0f |
chip max operating temperature
Definition at line 48 of file driver_bh1750fvi.c.
#define TEMPERATURE_MIN -40.0f |
chip min operating temperature
Definition at line 47 of file driver_bh1750fvi.c.