color9 2.0.0.0
|
Functions | |
void | color9_cfg_setup (color9_cfg_t *cfg) |
Config Object Initialization function. | |
COLOR9_RETVAL | color9_init (color9_t *ctx, color9_cfg_t *cfg) |
Initialization function. | |
void | color9_write (color9_t *ctx, uint8_t reg_addr, uint8_t r_data) |
Generic write function. | |
uint8_t | color9_read (color9_t *ctx, uint8_t reg_addr) |
Generic read function. | |
void | color9_sw_reset (color9_t *ctx) |
Software reset function. | |
uint32_t | color9_get_Ir (color9_t *ctx) |
Get value of IR measurement reading. | |
uint32_t | color9_get_green (color9_t *ctx) |
Gets value of Green measurement reading. | |
uint32_t | color9_get_blue (color9_t *ctx) |
Gets value of Blue measurement reading. | |
uint32_t | color9_get_red (color9_t *ctx) |
Gets value of Red measurement reading. | |
uint8_t | color9_get_status_reg (color9_t *ctx) |
Status register value. | |
void | color9_meas_rate (color9_t *ctx, uint8_t resolution, uint8_t meas_rate) |
Configure measurement rates. | |
void | color9_reg_ctrl (color9_t *ctx, uint8_t cfg) |
Function for setting the main configuration register. | |
void | color9_set_gain (color9_t *ctx, uint8_t g_setting) |
Function for gain setting. | |
void | color9_int_config (color9_t *ctx, uint8_t int_select, uint8_t int_mode, uint8_t cfg_setting) |
Interrupt configuration. | |
void | color9_sample_compare (color9_t *ctx, uint8_t num_of_compares) |
Configre number of compares between samples. | |
uint32_t | color9_read_32 (color9_t *ctx, uint8_t reg_addr) |
Generic read function for 32 bits. | |
void | color9_write_32 (color9_t *ctx, uint8_t reg_addr, uint32_t treas_val) |
Generic write function for 32 bits. | |
void | color9_similarity_count (color9_t *ctx, uint8_t sim_set) |
Similarity count. | |
void | color9_upper_tresset (color9_t *ctx, uint32_t set_val) |
Upper Tresset. | |
void | color9_lower_tresset (color9_t *ctx, uint32_t set_val) |
Lower Tresset. | |
void color9_cfg_setup | ( | color9_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint32_t color9_get_blue | ( | color9_t * | ctx | ) |
Gets value of Blue measurement reading.
color9 | Click object. |
@description This function gets Blue measurement reading.
uint32_t color9_get_green | ( | color9_t * | ctx | ) |
Gets value of Green measurement reading.
color9 | Click object. |
@description This function gets Green measurement reading.
uint32_t color9_get_Ir | ( | color9_t * | ctx | ) |
Get value of IR measurement reading.
color9 | Click object. |
@description This function gets IR reading.
uint32_t color9_get_red | ( | color9_t * | ctx | ) |
Gets value of Red measurement reading.
color9 | Click object. |
@description This function gets Red measurement reading.
uint8_t color9_get_status_reg | ( | color9_t * | ctx | ) |
Status register value.
color9 | Click object. |
@description This function gets status register value.
COLOR9_RETVAL color9_init | ( | color9_t * | ctx, |
color9_cfg_t * | cfg ) |
Initialization function.
color9 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void color9_int_config | ( | color9_t * | ctx, |
uint8_t | int_select, | ||
uint8_t | int_mode, | ||
uint8_t | cfg_setting ) |
Interrupt configuration.
color9 | Click object. |
int_select | Selects interrupt. |
int_mode | Selects mode. |
cfg_setting | Configuration settings. |
@description This function configures interrupt.
void color9_lower_tresset | ( | color9_t * | ctx, |
uint32_t | set_val ) |
Lower Tresset.
color9 | Click object. |
set_val | Lower tresset value. |
@description Sets lower tresset value.
void color9_meas_rate | ( | color9_t * | ctx, |
uint8_t | resolution, | ||
uint8_t | meas_rate ) |
Configure measurement rates.
color9 | Click object. |
resolution | Resolution. |
meas_rate | Measurement rate. |
@description This function configures measurement rate.
uint8_t color9_read | ( | color9_t * | ctx, |
uint8_t | reg_addr ) |
Generic read function.
color9 | Click object. |
reg_addr | Register address to read from. |
uint32_t color9_read_32 | ( | color9_t * | ctx, |
uint8_t | reg_addr ) |
Generic read function for 32 bits.
color9 | Click object. |
reg_addr | Address form which we read 32 bits. |
@description This reads 32 bits from given address.
void color9_reg_ctrl | ( | color9_t * | ctx, |
uint8_t | cfg ) |
Function for setting the main configuration register.
color9 | Click object. |
cfg | Configuration register. |
@description This function configures the main configuration register.
void color9_sample_compare | ( | color9_t * | ctx, |
uint8_t | num_of_compares ) |
Configre number of compares between samples.
color9 | Click object. |
num_of_compares | Number of compares. |
@description This function configures interrupt.
void color9_set_gain | ( | color9_t * | ctx, |
uint8_t | g_setting ) |
Function for gain setting.
color9 | Click object. |
g_settings | Gain settings. |
@description This function configures the gain settings.
void color9_similarity_count | ( | color9_t * | ctx, |
uint8_t | sim_set ) |
Similarity count.
color9 | Click object. |
sim_set | Set similarity. |
@description This function sets the similarity.
void color9_sw_reset | ( | color9_t * | ctx | ) |
Software reset function.
color9 | Click object. |
@description This function resets the software.
void color9_upper_tresset | ( | color9_t * | ctx, |
uint32_t | set_val ) |
Upper Tresset.
color9 | Click object. |
set_val | Upper tresset value. |
@description Sets upper tresset value.
void color9_write | ( | color9_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | r_data ) |
Generic write function.
color9 | Click object. |
reg_addr | Register address to write to. |
reg_data | Data to write to register address. |
@description This function writes data to given address.
void color9_write_32 | ( | color9_t * | ctx, |
uint8_t | reg_addr, | ||
uint32_t | treas_val ) |
Generic write function for 32 bits.
color9 | Click object. |
reg_addr | Address to write to 32 bits. |
treas_val | Value to be written. |
@description This function writes 32 bits to given address.