color2 2.0.0.0
|
This file contains API for Color 2 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | color2_t |
Click ctx object definition. More... | |
struct | color2_cfg_t |
Click configuration structure definition. More... | |
struct | color2_rgb_t |
Color 2 RGB channels data object. More... | |
struct | color2_hsl_t |
Color 2 HSL color data object. More... | |
Functions | |
void | color2_cfg_setup (color2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | color2_init (color2_t *ctx, color2_cfg_t *cfg) |
Initialization function. | |
err_t | color2_default_cfg (color2_t *ctx) |
Click Default Configuration function. | |
err_t | color2_generic_write (color2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Color 2 I2C writing function. | |
err_t | color2_generic_read (color2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Color 2 I2C reading function. | |
err_t | color2_write_reg (color2_t *ctx, uint8_t reg, uint8_t data_in) |
Generic write data function. | |
err_t | color2_read_reg (color2_t *ctx, uint8_t reg, uint8_t *data_out) |
Generic read data function. | |
uint8_t | color2_get_int_pin (color2_t *ctx) |
Get int pin function. | |
err_t | color2_reset (color2_t *ctx) |
Reset default register value function. | |
err_t | color2_init_advanced (color2_t *ctx, uint8_t config1, uint8_t config2, uint8_t config3) |
Init advanced function. | |
err_t | color2_set_upper_threshold (color2_t *ctx, uint16_t upper_threshold) |
Function set upper threshold register. | |
err_t | color2_set_lower_hreshold (color2_t *ctx, uint16_t lower_threshold) |
Function set lower threshold register. | |
err_t | color2_read_upper_threshold (color2_t *ctx, uint16_t *upper_threshold) |
Function read upper threshold register. | |
err_t | color2_read_lower_threshold (color2_t *ctx, uint16_t *lower_threshold) |
Function read lower threshold register. | |
err_t | color2_read_rgb (color2_t *ctx, color2_rgb_t *rgb) |
Function read rgb data. | |
err_t | color2_read_status (color2_t *ctx, uint8_t *status) |
Function read status registe value. | |
void | color2_rgb_to_hsl (color2_t *ctx, color2_rgb_t *rgb, color2_hsl_t *hsl) |
Functions for read color value. | |
uint8_t | color2_get_color (color2_hsl_t *hsl) |
Functions for detect colors. | |
This file contains API for Color 2 Click driver.