ambient5 2.0.0.0
|
Functions | |
void | ambient5_cfg_setup (ambient5_cfg_t *cfg) |
Config Object Initialization function. | |
AMBIENT5_RETVAL | ambient5_init (ambient5_t *ctx, ambient5_cfg_t *cfg) |
Initialization function. | |
void | ambient5_default_cfg (ambient5_t *ctx) |
Default configuration function. | |
void | ambient5_set_register (ambient5_t *ctx, uint8_t reg_addr, uint16_t reg_value) |
Set register function. | |
uint16_t | ambient5_get_register (ambient5_t *ctx, uint8_t reg) |
Get register function. | |
float | ambient5_get_resolution (ambient5_t *ctx) |
Get resolution. | |
uint16_t | ambient5_get_refresh_time (ambient5_t *ctx) |
Get refresh time. | |
float | ambient5_get_high_resolution_light_level (ambient5_t *ctx) |
Get high resolution light level. | |
float | ambient5_get_white_channel_light_level (ambient5_t *ctx) |
Get white channel light level. | |
void | ambient5_set_low_light_level_threshold (ambient5_t *ctx, float low_light_level_threshold) |
Set low light level threshold. | |
void | ambient5_set_high_light_level_threshold (ambient5_t *ctx, float high_light_level_threshold) |
Set high light level threshold. | |
void | ambient5_power_on (ambient5_t *ctx) |
Set high light level threshold. | |
uint8_t | ambient5_checkIntPin (ambient5_t *ctx) |
Checking INT pin state. | |
void ambient5_cfg_setup | ( | ambient5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t ambient5_checkIntPin | ( | ambient5_t * | ctx | ) |
Checking INT pin state.
ctx | Click object. |
@description This function checks INT pin state.
void ambient5_default_cfg | ( | ambient5_t * | ctx | ) |
Default configuration function.
ambient5 | Click object. |
@description This function sets default configuration for the module.
float ambient5_get_high_resolution_light_level | ( | ambient5_t * | ctx | ) |
Get high resolution light level.
ctx | Click object. |
@description This function calculates light level (lux) read from "high resolution output data" register.
uint16_t ambient5_get_refresh_time | ( | ambient5_t * | ctx | ) |
Get refresh time.
ctx | Click object. |
@description This function calculates refresh time, based on user settings for integration time and power saving mode.
uint16_t ambient5_get_register | ( | ambient5_t * | ctx, |
uint8_t | reg ) |
Get register function.
ctx | Click object. |
reg | Register address. |
@description This function reads data from the desired register.
float ambient5_get_resolution | ( | ambient5_t * | ctx | ) |
Get resolution.
ctx | Click object. |
@description This function calculates resolution of output data in "high resolution" and "white channel" registers.
float ambient5_get_white_channel_light_level | ( | ambient5_t * | ctx | ) |
Get white channel light level.
ctx | Click object. |
@description This function calculates light level (lux) read from "white channel output data" register.
AMBIENT5_RETVAL ambient5_init | ( | ambient5_t * | ctx, |
ambient5_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void ambient5_power_on | ( | ambient5_t * | ctx | ) |
Set high light level threshold.
ctx | Click object. |
@description This function powers device on and sets basic settings.
void ambient5_set_high_light_level_threshold | ( | ambient5_t * | ctx, |
float | high_light_level_threshold ) |
Set high light level threshold.
ctx | Click object. |
high_light_level_threshold | High light level threshold. |
@description This function sets high light level threshold (lux) by setting "high threshold windows setting" register.
void ambient5_set_low_light_level_threshold | ( | ambient5_t * | ctx, |
float | low_light_level_threshold ) |
Set low light level threshold.
ctx | Click object. |
low_light_level_threshold | Low light level threshold. |
@description This function calculates light level (lux) read from "white channel output data" register.
void ambient5_set_register | ( | ambient5_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | reg_value ) |
Set register function.
ctx | Click object. |
reg_addr | Register address. |
reg_value | Register value to be written. @description This function writes register value to the desired register. |