lighttemp  2.0.0.0
Functions

Functions

void lighttemp_cfg_setup (lighttemp_cfg_t *cfg)
 Config Object Initialization function. More...
 
LIGHTTEMP_RETVAL lighttemp_init (lighttemp_t *ctx, lighttemp_cfg_t *cfg)
 Initialization function. More...
 
void lighttemp_generic_write (lighttemp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void lighttemp_generic_read (lighttemp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
uint16_t lighttemp_get_pg_voltage (lighttemp_t *ctx)
 Get voltage. More...
 
uint8_t lighttemp_get_interrupt_state (lighttemp_t *ctx)
 Get INT pin state. More...
 
void lighttemp_led1_set_duty_cycle (lighttemp_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle for LED1. More...
 
void lighttemp_led1_pwm_stop (lighttemp_t *ctx)
 Stop PWM module for LED1. More...
 
void lighttemp_led1_pwm_start (lighttemp_t *ctx)
 Start PWM module for LED1. More...
 
void lighttemp_led2_set_duty_cycle (lighttemp_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle for LED2. More...
 
void lighttemp_led2_pwm_stop (lighttemp_t *ctx)
 Stop PWM module for LED2. More...
 
void lighttemp_led2_pwm_start (lighttemp_t *ctx)
 Start PWM module for LED2. More...
 

Detailed Description

Function Documentation

◆ lighttemp_cfg_setup()

void lighttemp_cfg_setup ( lighttemp_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ lighttemp_generic_read()

void lighttemp_generic_read ( lighttemp_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

@description This function reads data from the desired register.

◆ lighttemp_generic_write()

void lighttemp_generic_write ( lighttemp_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.

@description This function writes data to the desired register.

◆ lighttemp_get_interrupt_state()

uint8_t lighttemp_get_interrupt_state ( lighttemp_t ctx)

Get INT pin state.

Parameters
ctxClick object.

@description This function get state of int_pin.

◆ lighttemp_get_pg_voltage()

uint16_t lighttemp_get_pg_voltage ( lighttemp_t ctx)

Get voltage.

Parameters
ctxClick object.

@description This function get voltage.

◆ lighttemp_init()

LIGHTTEMP_RETVAL lighttemp_init ( lighttemp_t ctx,
lighttemp_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ lighttemp_led1_pwm_start()

void lighttemp_led1_pwm_start ( lighttemp_t ctx)

Start PWM module for LED1.

Parameters
ctxClick object.

@description This function starts PWM module for LED1.

◆ lighttemp_led1_pwm_stop()

void lighttemp_led1_pwm_stop ( lighttemp_t ctx)

Stop PWM module for LED1.

Parameters
ctxClick object.

@description This function stops PWM module for LED1.

◆ lighttemp_led1_set_duty_cycle()

void lighttemp_led1_set_duty_cycle ( lighttemp_t ctx,
float  duty_cycle 
)

Generic sets PWM duty cycle for LED1.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle for LED1.

◆ lighttemp_led2_pwm_start()

void lighttemp_led2_pwm_start ( lighttemp_t ctx)

Start PWM module for LED2.

Parameters
ctxClick object.

@description This function starts PWM module for LED2.

◆ lighttemp_led2_pwm_stop()

void lighttemp_led2_pwm_stop ( lighttemp_t ctx)

Stop PWM module for LED2.

Parameters
ctxClick object.

@description This function stops PWM module for LED2.

◆ lighttemp_led2_set_duty_cycle()

void lighttemp_led2_set_duty_cycle ( lighttemp_t ctx,
float  duty_cycle 
)

Generic sets PWM duty cycle for LED2.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle for LED2.