ambient22
2.1.0.0
|
API for configuring and manipulating Ambient 22 Click driver. More...
Modules | |
Ambient 22 Registers List | |
List of registers of Ambient 22 Click driver. | |
Ambient 22 Registers Settings | |
Settings for registers of Ambient 22 Click driver. | |
Ambient 22 MikroBUS Map | |
MikroBUS pin mapping of Ambient 22 Click driver. | |
Functions | |
void | ambient22_cfg_setup (ambient22_cfg_t *cfg) |
Ambient 22 configuration object setup function. More... | |
err_t | ambient22_init (ambient22_t *ctx, ambient22_cfg_t *cfg) |
Ambient 22 initialization function. More... | |
err_t | ambient22_default_cfg (ambient22_t *ctx) |
Ambient 22 default configuration function. More... | |
err_t | ambient22_write_register (ambient22_t *ctx, uint8_t reg, uint16_t data_in) |
Ambient 22 write register function. More... | |
err_t | ambient22_read_register (ambient22_t *ctx, uint8_t reg, uint16_t *data_out) |
Ambient 22 read register function. More... | |
err_t | ambient22_check_communication (ambient22_t *ctx) |
Ambient 22 check communication function. More... | |
err_t | ambient22_read_lux (ambient22_t *ctx, float *lux) |
Ambient 22 read lux function. More... | |
uint8_t | ambient22_get_int_pin (ambient22_t *ctx) |
Ambient 22 get int pin function. More... | |
API for configuring and manipulating Ambient 22 Click driver.
void ambient22_cfg_setup | ( | ambient22_cfg_t * | cfg | ) |
Ambient 22 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ambient22_cfg_t object definition for detailed explanation. |
err_t ambient22_check_communication | ( | ambient22_t * | ctx | ) |
Ambient 22 check communication function.
This function checks the communication by reading and verifying the manufacturer and device identification numbers.
[in] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ambient22_default_cfg | ( | ambient22_t * | ctx | ) |
Ambient 22 default configuration function.
This function executes a default configuration of Ambient 22 click board.
[in] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t ambient22_get_int_pin | ( | ambient22_t * | ctx | ) |
Ambient 22 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
err_t ambient22_init | ( | ambient22_t * | ctx, |
ambient22_cfg_t * | cfg | ||
) |
Ambient 22 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ambient22_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ambient22_read_lux | ( | ambient22_t * | ctx, |
float * | lux | ||
) |
Ambient 22 read lux function.
This function checks for a conversion ready flag bit and then reads the ambient light level in lux.
[in] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
[out] | lux | : Ambient light level in lux. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ambient22_read_register | ( | ambient22_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out | ||
) |
Ambient 22 read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ambient22_write_register | ( | ambient22_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in | ||
) |
Ambient 22 write register function.
This function writes a desired data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See ambient22_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.