leddriver6 2.0.0.0

Functions

void leddriver6_cfg_setup (leddriver6_cfg_t *cfg)
 Config Object Initialization function.
 
err_t leddriver6_init (leddriver6_t *ctx, leddriver6_cfg_t *cfg)
 Initialization function.
 
err_t leddriver6_set_duty_cycle (leddriver6_t *ctx, float duty_cycle)
 Sets PWM duty cycle.
 
err_t leddriver6_pwm_stop (leddriver6_t *ctx)
 Stop PWM module.
 
err_t leddriver6_pwm_start (leddriver6_t *ctx)
 Start PWM module.
 
err_t leddriver6_read_adc (leddriver6_t *ctx, uint16_t *data_out)
 Read ADC function.
 
err_t leddriver6_get_pg_voltage (leddriver6_t *ctx, float *data_out)
 Function for reading current PG output voltage.
 
uint8_t leddriver6_get_interrupt_state (leddriver6_t *ctx)
 Function for getting interrupt pin state.
 

Detailed Description

Function Documentation

◆ leddriver6_cfg_setup()

void leddriver6_cfg_setup ( leddriver6_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.

◆ leddriver6_get_interrupt_state()

uint8_t leddriver6_get_interrupt_state ( leddriver6_t * ctx)

Function for getting interrupt pin state.

Parameters
ctxClick object.
Returns
0 (low) - fault conditions report, 1 (high) - no fault conditions.

@description This function checks the state of interrupt (INT) pin.

◆ leddriver6_get_pg_voltage()

err_t leddriver6_get_pg_voltage ( leddriver6_t * ctx,
float * data_out )

Function for reading current PG output voltage.

Parameters
ctxClick object.
data_outOutput voltage level [V].
Returns
0 - Ok, (-1) - Error.

@description This function gets and calculates the Power Good voltage level.

◆ leddriver6_init()

err_t leddriver6_init ( leddriver6_t * ctx,
leddriver6_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0 - Ok, (-1) - Error.

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

◆ leddriver6_pwm_start()

err_t leddriver6_pwm_start ( leddriver6_t * ctx)

Start PWM module.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description This function starts PWM module.

◆ leddriver6_pwm_stop()

err_t leddriver6_pwm_stop ( leddriver6_t * ctx)

Stop PWM module.

Parameters
ctxClick object.
Returns
0 - Ok, (-1) - Error.

@description This function stops PWM module.

◆ leddriver6_read_adc()

err_t leddriver6_read_adc ( leddriver6_t * ctx,
uint16_t * data_out )

Read ADC function.

Parameters
ctxClick object.
data_outOutput converted data [12-bit].
Returns
0 - Ok, (-1) - Error.

@description This function reads the ADC converted results of Power Good voltage level.

◆ leddriver6_set_duty_cycle()

err_t leddriver6_set_duty_cycle ( leddriver6_t * ctx,
float duty_cycle )

Sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty ratio.
Returns
0 - Ok, (-1) - Error.

@description This function sets the PWM duty cycle.