color8 2.0.0.0
|
Functions | |
void | color8_cfg_setup (color8_cfg_t *cfg) |
Config Object Initialization function. | |
COLOR8_RETVAL | color8_init (color8_t *ctx, color8_cfg_t *cfg) |
Initialization function. | |
void | color8_generic_write (color8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | color8_generic_read (color8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | color8_write_byte (color8_t *ctx, uint8_t reg, uint8_t w_data) |
Functions for write one byte in register. | |
uint8_t | color8_read_byte (color8_t *ctx, uint8_t reg) |
Functions for read one byte data from register. | |
uint8_t | color8_get_interrupt (color8_t *ctx) |
Functions get interrupt. | |
uint16_t | color8_read_data (color8_t *ctx, uint8_t reg_data) |
Functions for read data from register. | |
float | color8_get_color_value (color8_t *ctx) |
Functions for read color value. | |
uint8_t | color8_get_color (color8_t *ctx, float color_value) |
Functions for detect colors. | |
void color8_cfg_setup | ( | color8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void color8_generic_read | ( | color8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void color8_generic_write | ( | color8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t color8_get_color | ( | color8_t * | ctx, |
float | color_value ) |
Functions for detect colors.
ctx | Click object. |
color_value | Color value in HSL. |
@description This function detect colors. PINK color - from 0.920 to 0.974 PURPLE color - from 0.6201 to 0.919 BLUE color - from 0.521 to 0.620 CYAN color - from 0.430 to 0.520 GREEN color - from 0.300 to 0.429 YELLOW color - from 0.019 to 0.200 RED color - from 0.0005 to 0.018
float color8_get_color_value | ( | color8_t * | ctx | ) |
Functions for read color value.
ctx | Click object. |
@description This functions reads 3 color filters and Clear Filters and converts the resulting color from RGB to HSL. The color range is between 0.00 and 1.0000.
uint8_t color8_get_interrupt | ( | color8_t * | ctx | ) |
Functions get interrupt.
ctx | Click object. |
@description This function gets interrupt.
COLOR8_RETVAL color8_init | ( | color8_t * | ctx, |
color8_cfg_t * | cfg ) |
Initialization function.
color8 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t color8_read_byte | ( | color8_t * | ctx, |
uint8_t | reg ) |
Functions for read one byte data from register.
ctx | Click object. |
reg | Register address. |
@description This function reads one byte data from register.
uint16_t color8_read_data | ( | color8_t * | ctx, |
uint8_t | reg_data ) |
Functions for read data from register.
ctx | Click object. |
reg_data | Register in which the data will be written. |
@description This function reads data from register.
void color8_write_byte | ( | color8_t * | ctx, |
uint8_t | reg, | ||
uint8_t | w_data ) |
Functions for write one byte in register.
ctx | Click object. |
reg | Register address. |
w_data | Data which be written in the register. |
@description This function writes one byte in register.