color3 2.0.0.0
|
This file contains API for Color 3 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 | color3_t |
Click ctx object definition. More... | |
struct | color3_cfg_t |
Click configuration structure definition. More... | |
struct | color3_channels_t |
Color 3 RGBC channels data object. More... | |
struct | color3_hsl_t |
Color 3 HSL color data object. More... | |
Functions | |
void | color3_cfg_setup (color3_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | color3_init (color3_t *ctx, color3_cfg_t *cfg) |
Initialization function. | |
err_t | color3_generic_write (color3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Generic write function. | |
err_t | color3_generic_read (color3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Generic read function. | |
void | color3_normal_wr_byte (color3_t *ctx, uint8_t wr_addr, uint8_t wr_data) |
Generic read function. | |
void | color3_special_wr_byte (color3_t *ctx, uint8_t wr_addr, uint8_t wr_data) |
Special write byte function. | |
uint8_t | color3_read_byte (color3_t *ctx, uint8_t rd_addr) |
Read byte function. | |
void | color3_normal_wr_data (color3_t *ctx, uint8_t wr_addr, uint16_t wr_data) |
Normal write data function. | |
void | color3_special_wr_data (color3_t *ctx, uint8_t wr_addr, uint16_t wr_data) |
Special write function. | |
uint16_t | color3_read_data (color3_t *ctx, uint8_t rd_addr) |
Read data function. | |
void | color3_write_enable_reg (color3_t *ctx, uint8_t wr_data) |
Write Enable Register function. | |
uint8_t | color3_read_enable_reg (color3_t *ctx) |
Read Enable Register function. | |
void | color3_write_rgbc_timing_reg (color3_t *ctx, uint8_t wr_data) |
Write RGBC Timing Register function. | |
uint8_t | color3_read_rgbc_timing_reg (color3_t *ctx) |
Read RGBC Timing Register function. | |
void | color3_write_prox_timing_reg (color3_t *ctx) |
Write Proximity Timing Register function. | |
uint8_t | color3_read_prox_timing_reg (color3_t *ctx) |
Read Proximity Timing Register function. | |
void | color3_write_wait_time_reg (color3_t *ctx, uint8_t wr_data) |
Write Wait Time Register function. | |
uint8_t | color3_read_wait_time_reg (color3_t *ctx) |
Read Wait Time Register function. | |
void | color3_set_inter_trsh_lo (color3_t *ctx, uint16_t wr_data) |
RGBC interrupt threshold low value function. | |
void | color3_set_inter_trsh_hi (color3_t *ctx, uint16_t wr_data) |
RGBC interrupt threshold high value function. | |
void | color3_set_prox_inter_trsh_lo (color3_t *ctx, uint16_t wr_data) |
Proximity interrupt threshold low value function. | |
void | color3_set_prox_inter_trsh_hi (color3_t *ctx, uint16_t wr_data) |
Proximity interrupt threshold high value function. | |
void | color3_set_int_pers (color3_t *ctx, uint8_t int_pers) |
Set Interrupt persistence persistence function. | |
uint8_t | color3_read_int_pers (color3_t *ctx) |
Read Interrupt persistence function. | |
void | color3_set_prox_int_pers (color3_t *ctx, uint8_t int_pers) |
Set Proximity interrupt persistence function. | |
uint8_t | color3_read_prox_int_pers (color3_t *ctx) |
Read Proximity interrupt persistence function. | |
void | color3_set_long_wait (color3_t *ctx, uint8_t lon_wait) |
Set long wait function. | |
uint8_t | color3_read_long_wait (color3_t *ctx) |
Read long wait function. | |
void | color3_write_pulse_cnt (color3_t *ctx, uint8_t pulse_cnt) |
Write Proximity Pulse Count function. | |
uint8_t | color3_read_pulse_cnt (color3_t *ctx) |
Read Proximity Pulse Count function. | |
void | color3_write_rgbc_gain (color3_t *ctx, uint8_t gain) |
Write RGBC Gain Value function. | |
uint8_t | color3_read_rgbc_gain (color3_t *ctx) |
Read RGBC Gain Value function. | |
void | color3_set_diode_select (color3_t *ctx, uint8_t dio_sel) |
Set Diode Selection function. | |
uint8_t | color3_get_diode_select (color3_t *ctx) |
Get Diode Selection function. | |
void | color3_set_led_str (color3_t *ctx, uint8_t led_str) |
Set LED Strength function. | |
uint8_t | color3_read_led_str (color3_t *ctx) |
Read LED Strength function. | |
uint8_t | color3_read_dev_id (color3_t *ctx) |
Read device ID function. | |
uint8_t | color3_read_dev_stat (color3_t *ctx) |
Read device status function. | |
uint16_t | color3_read_clear_data (color3_t *ctx) |
Read clear data function. | |
uint16_t | color3_read_red_data (color3_t *ctx) |
Read red data function. | |
uint16_t | color3_read_green_data (color3_t *ctx) |
Read green data function. | |
uint16_t | color3_read_blue_data (color3_t *ctx) |
Read blue data function. | |
uint16_t | color3_read_prox_data (color3_t *ctx) |
ead proximity data function. | |
uint8_t | color3_get_inter_state (color3_t *ctx) |
Get Interrupt state function. | |
void | color3_set_default_settings (color3_t *ctx) |
Default settings function. | |
void | color3_get_rgb_data (color3_t *ctx, uint16_t *red_data, uint16_t *green_data, uint16_t *blue_data) |
Get color data function. | |
float | color3_get_color_ratio (color3_t *ctx, uint16_t color_data) |
Get color ratio function. | |
err_t | color3_get_rgbc_data (color3_t *ctx, color3_channels_t *channels) |
Color 3 get rgbc data function. | |
uint8_t | color3_get_color (color3_hsl_t *hsl) |
Color 3 get color function. | |
void | color3_rgbc_to_hsl (color3_t *ctx, color3_channels_t *rgbc, color3_hsl_t *hsl) |
Color 3 rgbc to hsl function. | |
This file contains API for Color 3 Click driver.