proximity3 2.0.0.0
|
Functions | |
void | proximity3_cfg_setup (proximity3_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | proximity3_init (proximity3_t *ctx, proximity3_cfg_t *cfg) |
Initialization function. | |
err_t | proximity3_default_cfg (proximity3_t *ctx) |
Proximity 3 default configuration function. | |
err_t | proximity3_write_16 (proximity3_t *ctx, uint8_t reg_address, uint16_t data_in) |
Generic write function. | |
uint16_t | proximity3_read_16 (proximity3_t *ctx, uint8_t reg_address) |
Generic read function. | |
uint16_t | proximity3_read_als (proximity3_t *ctx) |
Read ambient light sensor data. | |
uint16_t | proximity3_read_proximity (proximity3_t *ctx) |
Read proximity. | |
void proximity3_cfg_setup | ( | proximity3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
err_t proximity3_default_cfg | ( | proximity3_t * | ctx | ) |
Proximity 3 default configuration function.
This function executes a default configuration of Proximity 3 click board.
[in] | ctx | : Click context object. See proximity3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t proximity3_init | ( | proximity3_t * | ctx, |
proximity3_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.uint16_t proximity3_read_16 | ( | proximity3_t * | ctx, |
uint8_t | reg_address ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
This function reads data from the desired register.
uint16_t proximity3_read_als | ( | proximity3_t * | ctx | ) |
Read ambient light sensor data.
ctx | Click object. |
This function gets the data returned by the ambient light sensor.
uint16_t proximity3_read_proximity | ( | proximity3_t * | ctx | ) |
Read proximity.
ctx | Click object. |
This function returns the proximity.
err_t proximity3_write_16 | ( | proximity3_t * | ctx, |
uint8_t | reg_address, | ||
uint16_t | data_in ) |
Generic write function.
ctx | Click object. |
reg_address | Register address. |
data_in | 16-BIT data ata to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.