ambient10
2.0.0.0
|
API for configuring and manipulating Ambient 10 Click driver. More...
Modules | |
Ambient 10 Settings | |
Settings for Ambient 10 Click driver. | |
Ambient 10 MikroBUS Map | |
MikroBUS pin mapping of Ambient 10 Click driver. | |
Functions | |
void | ambient10_cfg_setup (ambient10_cfg_t *cfg) |
Ambient 10 configuration object setup function. More... | |
err_t | ambient10_init (ambient10_t *ctx, ambient10_cfg_t *cfg) |
Ambient 10 initialization function. More... | |
err_t | ambient10_read_an_pin_value (ambient10_t *ctx, uint16_t *data_out) |
Ambient 10 read AN pin value function. More... | |
err_t | ambient10_read_an_pin_voltage (ambient10_t *ctx, float *data_out) |
Ambient 10 read AN pin voltage level function. More... | |
err_t | ambient10_read_raw_adc (ambient10_t *ctx, uint16_t *raw_adc) |
Ambient 10 read raw ADC function. More... | |
err_t | ambient10_read_adc_voltage (ambient10_t *ctx, float *voltage) |
Ambient 10 read ADC voltage function. More... | |
err_t | ambient10_set_vref (ambient10_t *ctx, float vref) |
Ambient 10 set vref function. More... | |
uint16_t | ambient10_voltage_to_lux (ambient10_t *ctx, float voltage) |
Ambient 10 voltage to illuminance function. More... | |
API for configuring and manipulating Ambient 10 Click driver.
void ambient10_cfg_setup | ( | ambient10_cfg_t * | cfg | ) |
Ambient 10 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ambient10_cfg_t object definition for detailed explanation. |
err_t ambient10_init | ( | ambient10_t * | ctx, |
ambient10_cfg_t * | cfg | ||
) |
Ambient 10 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ambient10_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ambient10_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ambient10_read_adc_voltage | ( | ambient10_t * | ctx, |
float * | voltage | ||
) |
Ambient 10 read ADC voltage function.
This function reads raw 12-bit ADC data and converts it to voltage by using I2C serial interface.
[in] | ctx | : Click context object. See ambient10_t object definition for detailed explanation. |
[out] | voltage | : Calculated ADC voltage. |
0
- Success, -1
- Error.err_t ambient10_read_an_pin_value | ( | ambient10_t * | ctx, |
uint16_t * | data_out | ||
) |
Ambient 10 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See ambient10_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t ambient10_read_an_pin_voltage | ( | ambient10_t * | ctx, |
float * | data_out | ||
) |
Ambient 10 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 ambient10_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t ambient10_read_raw_adc | ( | ambient10_t * | ctx, |
uint16_t * | raw_adc | ||
) |
Ambient 10 read raw ADC function.
This function reads raw 12-bit ADC data by using I2C serial interface.
[in] | ctx | : Click context object. See ambient10_t object definition for detailed explanation. |
[out] | raw_adc | : Raw ADC read data. |
0
- Success, -1
- Error.err_t ambient10_set_vref | ( | ambient10_t * | ctx, |
float | vref | ||
) |
Ambient 10 set vref function.
This function sets the voltage reference for Ambient 10 click driver.
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error.uint16_t ambient10_voltage_to_lux | ( | ambient10_t * | ctx, |
float | voltage | ||
) |
Ambient 10 voltage to illuminance function.
This function calculates illuminance (lux) based on the voltage input.
[in] | voltage | : Voltage from OUT (volts). |