leddriver14 2.0.0.0
|
API for configuring and manipulating LED Driver 14 Click driver. More...
Topics | |
LED Driver 14 Registers Settings | |
Settings for registers of LED Driver 14 Click driver. | |
LED Driver 14 MikroBUS Map | |
MikroBUS pin mapping of LED Driver 14 Click driver. | |
Functions | |
void | leddriver14_cfg_setup (leddriver14_cfg_t *cfg) |
LED Driver 14 configuration object setup function. | |
err_t | leddriver14_init (leddriver14_t *ctx, leddriver14_cfg_t *cfg) |
LED Driver 14 initialization function. | |
err_t | leddriver14_default_cfg (leddriver14_t *ctx) |
LED Driver 14 default configuration function. | |
err_t | leddriver14_set_rset (leddriver14_t *ctx, uint8_t rset, uint16_t res_ohm) |
LED Driver 14 set rset function. | |
void | leddriver14_rset_write_protect (leddriver14_t *ctx, uint8_t state) |
LED Driver 14 rset write protect function. | |
uint8_t | leddriver14_get_int_pin (leddriver14_t *ctx) |
LED Driver 14 get int pin function. | |
err_t | leddriver14_set_duty_cycle (leddriver14_t *ctx, float duty_cycle) |
LED Driver 14 sets PWM duty cycle. | |
err_t | leddriver14_pwm_stop (leddriver14_t *ctx) |
LED Driver 14 stop PWM module. | |
err_t | leddriver14_pwm_start (leddriver14_t *ctx) |
LED Driver 14 start PWM module. | |
API for configuring and manipulating LED Driver 14 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void leddriver14_cfg_setup | ( | leddriver14_cfg_t * | cfg | ) |
LED Driver 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See leddriver14_cfg_t object definition for detailed explanation. |
err_t leddriver14_default_cfg | ( | leddriver14_t * | ctx | ) |
LED Driver 14 default configuration function.
This function executes a default configuration of LED Driver 14 click board.
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t leddriver14_get_int_pin | ( | leddriver14_t * | ctx | ) |
LED Driver 14 get int pin function.
This function returns the int pin logic state.
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
0
- Abnormality such as LED Open or the OUTx pin short circuit occured, 1
- Normal operation. err_t leddriver14_init | ( | leddriver14_t * | ctx, |
leddriver14_cfg_t * | cfg ) |
LED Driver 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See leddriver14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver14_pwm_start | ( | leddriver14_t * | ctx | ) |
LED Driver 14 start PWM module.
This function starts the PWM module output.
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver14_pwm_stop | ( | leddriver14_t * | ctx | ) |
LED Driver 14 stop PWM module.
This function stops the PWM module output.
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
0
- Success, -1
- Error.void leddriver14_rset_write_protect | ( | leddriver14_t * | ctx, |
uint8_t | state ) |
LED Driver 14 rset write protect function.
This function sets the write protect pin logic state.
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
[in] | state | :
|
err_t leddriver14_set_duty_cycle | ( | leddriver14_t * | ctx, |
float | duty_cycle ) |
LED Driver 14 sets PWM duty cycle.
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error.err_t leddriver14_set_rset | ( | leddriver14_t * | ctx, |
uint8_t | rset, | ||
uint16_t | res_ohm ) |
LED Driver 14 set rset function.
This function sets the resistance of the selected rset channel.
[in] | ctx | : Click context object. See leddriver14_t object definition for detailed explanation. |
[in] | rset | : Rset channel [0-3]. |
[in] | res_ohm | : Resistance in Ohm [0-24000]. |
0
- Success, -1
- Error.