leddriver11 2.0.0.0
|
API for configuring and manipulating LED Driver 11 Click driver. More...
Topics | |
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. | |
err_t | leddriver11_init (leddriver11_t *ctx, leddriver11_cfg_t *cfg) |
LED Driver 11 initialization function. | |
err_t | leddriver11_default_cfg (leddriver11_t *ctx) |
LED Driver 11 default configuration function. | |
err_t | leddriver11_set_current (leddriver11_t *ctx, uint16_t curr) |
LED Driver 11 set current function. | |
err_t | leddriver11_read_dac_memory (leddriver11_t *ctx, uint8_t *data_out) |
LED Driver 11 read DAC memory. | |
err_t | leddriver11_read_an_pin_value (leddriver11_t *ctx, uint16_t *data_out) |
LED Driver 11 read AN pin value function. | |
err_t | leddriver11_read_an_pin_voltage (leddriver11_t *ctx, float *data_out) |
LED Driver 11 read AN pin voltage level function. | |
err_t | leddriver11_set_duty_cycle (leddriver11_t *ctx, float duty_cycle) |
LED Driver 11 sets PWM duty cycle. | |
err_t | leddriver11_pwm_stop (leddriver11_t *ctx) |
LED Driver 11 stop PWM module. | |
err_t | leddriver11_pwm_start (leddriver11_t *ctx) |
LED Driver 11 start PWM module. | |
API for configuring and manipulating LED Driver 11 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
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.