color6  2.0.0.0
Functions
Public function

Functions

void color6_cfg_setup (color6_cfg_t *cfg)
 Config Object Initialization function. More...
 
COLOR6_RETVAL color6_init (color6_t *ctx, color6_cfg_t *cfg)
 Initialization function. More...
 
void color6_default_cfg (color6_t *ctx)
 Click Default Configuration function. More...
 
void color6_generic_write (color6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void color6_generic_read (color6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void color6_write_byte (color6_t *ctx, uint8_t reg, uint8_t r_data)
 Functions for write one byte in register. More...
 
uint8_t color6_read_byte (color6_t *ctx, uint8_t reg)
 Functions for read one byte data from register. More...
 
uint16_t color6_read_data (color6_t *ctx, uint8_t reg)
 Functions for read data from register. More...
 
float color6_get_temperature (color6_t *ctx)
 Functions for read temperature. More...
 
void color6_software_reset (color6_t *ctx)
 Functions for software reset. More...
 
void color6_go_to_measurement_mode (color6_t *ctx)
 Functions for go to measurement mode. More...
 
float color6_converting_to_ee (color6_t *ctx, uint8_t channel, uint16_t mres_data)
 Functions for go to measurement mode. More...
 

Detailed Description

Function Documentation

◆ color6_cfg_setup()

void color6_cfg_setup ( color6_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ color6_converting_to_ee()

float color6_converting_to_ee ( color6_t ctx,
uint8_t  channel,
uint16_t  mres_data 
)

Functions for go to measurement mode.

Parameters
ctxClick object.
channelchannel from which the data will be converted.
mres_datadata read from the channel.

This function should be called before the start measurement.

◆ color6_default_cfg()

void color6_default_cfg ( color6_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for Color6 click.

◆ color6_generic_read()

void color6_generic_read ( color6_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

This function reads data from the desired register.

◆ color6_generic_write()

void color6_generic_write ( color6_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

This function writes data to the desired register.

◆ color6_get_temperature()

float color6_get_temperature ( color6_t ctx)

Functions for read temperature.

Parameters
ctxClick object.

The measurement result is available as TEMP of the output result registers.

◆ color6_go_to_measurement_mode()

void color6_go_to_measurement_mode ( color6_t ctx)

Functions for go to measurement mode.

Parameters
ctxClick object.

This function should be called before the start measurement.

◆ color6_init()

COLOR6_RETVAL color6_init ( color6_t ctx,
color6_cfg_t cfg 
)

Initialization function.

Parameters
color6Click object.
cfgClick configuration structure.

This function initializes all necessary pins and peripherals used for this click.

◆ color6_read_byte()

uint8_t color6_read_byte ( color6_t ctx,
uint8_t  reg 
)

Functions for read one byte data from register.

Parameters
ctxClick object.
regRegister address.

This function reads one byte data from register.

◆ color6_read_data()

uint16_t color6_read_data ( color6_t ctx,
uint8_t  reg 
)

Functions for read data from register.

Parameters
ctxClick object.
regRegister address.

This function reads data from register.

◆ color6_software_reset()

void color6_software_reset ( color6_t ctx)

Functions for software reset.

Parameters
ctxClick object.

This function should be called at the start of the program before the configuration of the chip.

◆ color6_write_byte()

void color6_write_byte ( color6_t ctx,
uint8_t  reg,
uint8_t  r_data 
)

Functions for write one byte in register.

Parameters
ctxClick object.
regRegister address.
r_dataRegister data.

This function write one byte in register.