leddriver18 2.1.0.0
|
API for configuring and manipulating LED Driver 18 Click driver. More...
Topics | |
LED Driver 18 Registers List | |
List of registers of LED Driver 18 Click driver. | |
LED Driver 18 Registers Settings | |
Settings for registers of LED Driver 18 Click driver. | |
LED Driver 18 MikroBUS Map | |
MikroBUS pin mapping of LED Driver 18 Click driver. | |
Functions | |
void | leddriver18_cfg_setup (leddriver18_cfg_t *cfg) |
LED Driver 18 configuration object setup function. | |
err_t | leddriver18_init (leddriver18_t *ctx, leddriver18_cfg_t *cfg) |
LED Driver 18 initialization function. | |
err_t | leddriver18_default_cfg (leddriver18_t *ctx) |
LED Driver 18 default configuration function. | |
err_t | leddriver18_generic_write (leddriver18_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
LED Driver 18 I2C writing function. | |
err_t | leddriver18_generic_read (leddriver18_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
LED Driver 18 I2C reading function. | |
err_t | leddriver18_set_output_pwm (uint8_t out_num, float pwm_val) |
LED Driver 18 set output channel PWM value function. | |
float | leddriver18_get_output_pwm (uint8_t out_num) |
LED Driver 18 get output channel PWM value function. | |
void | leddriver18_write_config (leddriver18_t *ctx) |
LED Driver 18 write config function. | |
void | leddriver18_enable_output (leddriver18_t *ctx) |
LED Driver 18 enable output function. | |
void | leddriver18_disable_output (leddriver18_t *ctx) |
LED Driver 18 disable output function. | |
err_t | leddriver18_set_cc_output (leddriver18_t *ctx, uint8_t current_limit) |
LED Driver 18 set constant current output function. | |
err_t | leddriver18_get_cc_output (leddriver18_t *ctx, uint8_t *current_limit) |
LED Driver 18 get constant current output function. | |
API for configuring and manipulating LED Driver 18 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void leddriver18_cfg_setup | ( | leddriver18_cfg_t * | cfg | ) |
LED Driver 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See leddriver18_cfg_t object definition for detailed explanation. |
err_t leddriver18_default_cfg | ( | leddriver18_t * | ctx | ) |
LED Driver 18 default configuration function.
This function executes a default configuration of LED Driver 18 click board.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void leddriver18_disable_output | ( | leddriver18_t * | ctx | ) |
LED Driver 18 disable output function.
This function is used to disable output of LED Driver 18 click board.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
void leddriver18_enable_output | ( | leddriver18_t * | ctx | ) |
LED Driver 18 enable output function.
This function is used to enable output of LED Driver 18 click board.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
err_t leddriver18_generic_read | ( | leddriver18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
LED Driver 18 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver18_generic_write | ( | leddriver18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
LED Driver 18 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver18_get_cc_output | ( | leddriver18_t * | ctx, |
uint8_t * | current_limit ) |
LED Driver 18 get constant current output function.
This function is used to read constant current output of LED Driver 18 click board.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
[in] | current_limit | : Constant current value to be set. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. float leddriver18_get_output_pwm | ( | uint8_t | out_num | ) |
LED Driver 18 get output channel PWM value function.
This function is used to get output PWM of selected channel of LED Driver 18 click board.
[in] | out_num | : Selected output number. |
err_t leddriver18_init | ( | leddriver18_t * | ctx, |
leddriver18_cfg_t * | cfg ) |
LED Driver 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See leddriver18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver18_set_cc_output | ( | leddriver18_t * | ctx, |
uint8_t | current_limit ) |
LED Driver 18 set constant current output function.
This function is used to set constant current output of of LED Driver 18 click board.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |
[in] | current_limit | : Constant current value to be set. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver18_set_output_pwm | ( | uint8_t | out_num, |
float | pwm_val ) |
LED Driver 18 set output channel PWM value function.
This function is used to set output PWM of selected channel of LED Driver 18 click board.
[in] | out_num | : Selected output number. |
[in] | pwm_val | : PWM value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void leddriver18_write_config | ( | leddriver18_t * | ctx | ) |
LED Driver 18 write config function.
This function is used to update output settings of LED Driver 18 click board.
[in] | ctx | : Click context object. See leddriver18_t object definition for detailed explanation. |