ambient 2.0.0.0
|
Functions | |
void | ambient_cfg_setup (ambient_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | ambient_init (ambient_t *ctx, ambient_cfg_t *cfg) |
Initialization function. | |
err_t | ambient_read_an_pin_value (ambient_t *ctx, uint16_t *data_out) |
Ambient read AN pin value function. | |
err_t | ambient_read_an_pin_voltage (ambient_t *ctx, float *data_out) |
Ambient read AN pin voltage level function. | |
uint16_t | ambient_get_light_intensity (ambient_t *ctx) |
Calculate light intensity function. | |
void ambient_cfg_setup | ( | ambient_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint16_t ambient_get_light_intensity | ( | ambient_t * | ctx | ) |
Calculate light intensity function.
ctx | Click object. |
Calculates the light intensity from analog voltage measurement of the Melexis MLX75305 IC on Ambient click board.
err_t ambient_init | ( | ambient_t * | ctx, |
ambient_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
err_t ambient_read_an_pin_value | ( | ambient_t * | ctx, |
uint16_t * | data_out ) |
Ambient read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See ambient_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ambient_read_an_pin_voltage | ( | ambient_t * | ctx, |
float * | data_out ) |
Ambient read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See ambient_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.