leddriver 2.0.0.0

Functions

void leddriver_cfg_setup (leddriver_cfg_t *cfg)
 Config Object Initialization function.
 
LEDDRIVER_RETVAL leddriver_init (leddriver_t *ctx, leddriver_cfg_t *cfg)
 Initialization function.
 
uint16_t leddriver_get_pwm_max_duty (leddriver_t *ctx)
 Get Max PWM Duty Cycle function.
 
err_t leddriver_set_duty_cycle (leddriver_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
err_t leddriver_pwm_stop (leddriver_t *ctx)
 Stop PWM module.
 
err_t leddriver_pwm_start (leddriver_t *ctx)
 Start PWM module.
 

Detailed Description

Function Documentation

◆ leddriver_cfg_setup()

void leddriver_cfg_setup ( leddriver_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.

◆ leddriver_get_pwm_max_duty()

uint16_t leddriver_get_pwm_max_duty ( leddriver_t * ctx)

Get Max PWM Duty Cycle function.

Parameters
ctxClick object.
Returns
Maximal PWM Duty Cycle.

@description This function returns a maximal pwm duty cycle depending on the selected frequency.

◆ leddriver_init()

LEDDRIVER_RETVAL leddriver_init ( leddriver_t * ctx,
leddriver_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0x00 - OK, 0xFF - Init error, 0xFE - Wrong frequency.

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

◆ leddriver_pwm_start()

err_t leddriver_pwm_start ( leddriver_t * ctx)

Start PWM module.

Parameters
ctxClick object.
Returns
See #err_t type of data.

@description This function starts PWM module.

◆ leddriver_pwm_stop()

err_t leddriver_pwm_stop ( leddriver_t * ctx)

Stop PWM module.

Parameters
ctxClick object.
Returns
See #err_t type of data.

@description This function stops PWM module.

◆ leddriver_set_duty_cycle()

err_t leddriver_set_duty_cycle ( leddriver_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.
Returns
See #err_t type of data.

@description This function sets the PWM duty cycle.