leddriver11
2.0.0.0
|
API for configuring and manipulating LED Driver 11 Click driver. More...
Modules | |
LED Driver 11 Settings | |
Settings for LED Driver 11 Click driver. | |
LED Driver 11 MikroBUS Map | |
MikroBUS pin mapping of LED Driver 11 Click driver. | |
Functions | |
void | leddriver11_cfg_setup (leddriver11_cfg_t *cfg) |
LED Driver 11 configuration object setup function. More... | |
err_t | leddriver11_init (leddriver11_t *ctx, leddriver11_cfg_t *cfg) |
LED Driver 11 initialization function. More... | |
err_t | leddriver11_default_cfg (leddriver11_t *ctx) |
LED Driver 11 default configuration function. More... | |
err_t | leddriver11_set_current (leddriver11_t *ctx, uint16_t curr) |
LED Driver 11 set current function. More... | |
err_t | leddriver11_read_dac_memory (leddriver11_t *ctx, uint8_t *data_out) |
LED Driver 11 read DAC memory. More... | |
err_t | leddriver11_read_an_pin_value (leddriver11_t *ctx, uint16_t *data_out) |
LED Driver 11 read AN pin value function. More... | |
err_t | leddriver11_read_an_pin_voltage (leddriver11_t *ctx, float *data_out) |
LED Driver 11 read AN pin voltage level function. More... | |
err_t | leddriver11_set_duty_cycle (leddriver11_t *ctx, float duty_cycle) |
LED Driver 11 sets PWM duty cycle. More... | |
err_t | leddriver11_pwm_stop (leddriver11_t *ctx) |
LED Driver 11 stop PWM module. More... | |
err_t | leddriver11_pwm_start (leddriver11_t *ctx) |
LED Driver 11 start PWM module. More... | |
API for configuring and manipulating LED Driver 11 Click driver.
void leddriver11_cfg_setup | ( | leddriver11_cfg_t * | cfg | ) |
LED Driver 11 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See leddriver11_cfg_t object definition for detailed explanation. |
err_t leddriver11_default_cfg | ( | leddriver11_t * | ctx | ) |
LED Driver 11 default configuration function.
This function executes a default configuration of LED Driver 11 click board.
[in] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver11_init | ( | leddriver11_t * | ctx, |
leddriver11_cfg_t * | cfg | ||
) |
LED Driver 11 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See leddriver11_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver11_pwm_start | ( | leddriver11_t * | ctx | ) |
LED Driver 11 start PWM module.
This function starts the PWM moudle output.
[out] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver11_pwm_stop | ( | leddriver11_t * | ctx | ) |
LED Driver 11 stop PWM module.
This function stops the PWM moudle output.
[out] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver11_read_an_pin_value | ( | leddriver11_t * | ctx, |
uint16_t * | data_out | ||
) |
LED Driver 11 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t leddriver11_read_an_pin_voltage | ( | leddriver11_t * | ctx, |
float * | data_out | ||
) |
LED Driver 11 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.err_t leddriver11_read_dac_memory | ( | leddriver11_t * | ctx, |
uint8_t * | data_out | ||
) |
LED Driver 11 read DAC memory.
This function reads all the DAC module memory.
[in] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
[out] | data_out | : 6 bytes buffer where the read data is being stored. |
0
- Success, -1
- Error.err_t leddriver11_set_current | ( | leddriver11_t * | ctx, |
uint16_t | curr | ||
) |
LED Driver 11 set current function.
This function sets the LEDs current via a 12-bit DAC module.
[in] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
[in] | curr | : 12-bit DAC value.
|
0
- Success, -1
- Error.err_t leddriver11_set_duty_cycle | ( | leddriver11_t * | ctx, |
float | duty_cycle | ||
) |
LED Driver 11 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[out] | ctx | : Click context object. See leddriver11_t object definition for detailed explanation. |
[in] | duty_ratio | : PWM duty_ratio. |
0
- Success, -1
- Error.