light 2.0.0.0
|
Functions | |
void | light_cfg_setup (light_cfg_t *cfg) |
Config Object Initialization function. | |
LIGHT_RETVAL | light_init (light_t *ctx, light_cfg_t *cfg) |
Initialization function. | |
uint16_t | light_read_data (light_t *ctx) |
Generic read data function. | |
uint8_t | light_calculate_percent (light_t *ctx, uint16_t light_value) |
Function calculate percent. | |
uint8_t light_calculate_percent | ( | light_t * | ctx, |
uint16_t | light_value ) |
Function calculate percent.
ctx | Click object. |
light_value | 14-bit data ADC value |
@description Function calculate light intensity percent.
void light_cfg_setup | ( | light_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
LIGHT_RETVAL light_init | ( | light_t * | ctx, |
light_cfg_t * | cfg ) |
Initialization function.
light | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint16_t light_read_data | ( | light_t * | ctx | ) |
Generic read data function.
ctx | Click object. |
@description Function read 14-bit data from MCP3201.