leddriver19 2.1.0.0
|
API for configuring and manipulating LED Driver 19 Click driver. More...
Topics | |
LED Driver 19 Registers List | |
List of registers of LED Driver 19 Click driver. | |
LED Driver 19 Registers Settings | |
Settings for registers of LED Driver 19 Click driver. | |
LED Driver 19 MikroBUS Map | |
MikroBUS pin mapping of LED Driver 19 Click driver. | |
Functions | |
void | leddriver19_cfg_setup (leddriver19_cfg_t *cfg) |
LED Driver 19 configuration object setup function. | |
err_t | leddriver19_init (leddriver19_t *ctx, leddriver19_cfg_t *cfg) |
LED Driver 19 initialization function. | |
err_t | leddriver19_default_cfg (leddriver19_t *ctx) |
LED Driver 19 default configuration function. | |
err_t | leddriver19_generic_write (leddriver19_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
LED Driver 19 I2C writing function. | |
err_t | leddriver19_generic_read (leddriver19_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
LED Driver 19 I2C reading function. | |
uint8_t | leddriver19_get_int_pin (leddriver19_t *ctx) |
LED Driver 19 get interrupt pin state function. | |
err_t | leddriver19_write_reg (leddriver19_t *ctx, uint8_t reg, uint8_t data_in) |
LED Driver 19 I2C register writing function. | |
err_t | leddriver19_read_reg (leddriver19_t *ctx, uint8_t reg, uint8_t *data_out) |
LED Driver 19 I2C register reading function. | |
err_t | leddriver19_sw_reset (leddriver19_t *ctx) |
LED Driver 19 software reset function. | |
err_t | leddriver19_enable_channels (leddriver19_t *ctx, uint16_t channels_en) |
LED Driver 19 enables channels function. | |
err_t | leddriver19_disable_channels (leddriver19_t *ctx, uint16_t channels_dis) |
LED Driver 19 disable channels function. | |
err_t | leddriver19_set_pattern_pwm (leddriver19_t *ctx, uint8_t pattern_sel, uint8_t channel_sel, float pwm_value) |
LED Driver 19 set pattern PWM value function. | |
err_t | leddriver19_get_ch_current (leddriver19_t *ctx, uint8_t channel_sel, float *current_val) |
LED Driver 19 get channel current value function. | |
err_t | leddriver19_set_ch_current (leddriver19_t *ctx, uint8_t channel_sel, float current_val) |
LED Driver 19 set channel current value function. | |
err_t | leddriver19_get_int_data (leddriver19_t *ctx, uint8_t *int_data) |
LED Driver 19 get interrupt register data function. | |
err_t | leddriver19_get_nc_led (leddriver19_t *ctx, uint16_t *led_data) |
LED Driver 19 get LED open ( NC channels ) data function. | |
API for configuring and manipulating LED Driver 19 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void leddriver19_cfg_setup | ( | leddriver19_cfg_t * | cfg | ) |
LED Driver 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See leddriver19_cfg_t object definition for detailed explanation. |
err_t leddriver19_default_cfg | ( | leddriver19_t * | ctx | ) |
LED Driver 19 default configuration function.
This function executes a default configuration of LED Driver 19 click board.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_disable_channels | ( | leddriver19_t * | ctx, |
uint16_t | channels_dis ) |
LED Driver 19 disable channels function.
This function is used to disable channel output.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | channels_en | : Channels that will be disabled. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_enable_channels | ( | leddriver19_t * | ctx, |
uint16_t | channels_en ) |
LED Driver 19 enables channels function.
This function is used to enable channel output.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | channels_en | : Channels that will be enabled. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_generic_read | ( | leddriver19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
LED Driver 19 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 leddriver19_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 leddriver19_generic_write | ( | leddriver19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
LED Driver 19 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 leddriver19_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 leddriver19_get_ch_current | ( | leddriver19_t * | ctx, |
uint8_t | channel_sel, | ||
float * | current_val ) |
LED Driver 19 get channel current value function.
This function is used to get the current value of the selected channel.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | channel_sel | : Channel selection. |
[out] | current_val | : Current value in mA. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_get_int_data | ( | leddriver19_t * | ctx, |
uint8_t * | int_data ) |
LED Driver 19 get interrupt register data function.
This function is used to get interrupt flags data from the interrupt register.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[out] | int_data | : Interrupt register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t leddriver19_get_int_pin | ( | leddriver19_t * | ctx | ) |
LED Driver 19 get interrupt pin state function.
This function reads an interrupt pin state.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
err_t leddriver19_get_nc_led | ( | leddriver19_t * | ctx, |
uint16_t * | led_data ) |
LED Driver 19 get LED open ( NC channels ) data function.
This function is used to check if all enabled channels are connected.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[out] | led_data | : Open LED channels data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_init | ( | leddriver19_t * | ctx, |
leddriver19_cfg_t * | cfg ) |
LED Driver 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See leddriver19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_read_reg | ( | leddriver19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
LED Driver 19 I2C register reading function.
This function reads bytes of data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_set_ch_current | ( | leddriver19_t * | ctx, |
uint8_t | channel_sel, | ||
float | current_val ) |
LED Driver 19 set channel current value function.
This function is used to set the current value of the selected channel.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | channel_sel | : Channel selection. |
[in] | current_val | : Current value in mA. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_set_pattern_pwm | ( | leddriver19_t * | ctx, |
uint8_t | pattern_sel, | ||
uint8_t | channel_sel, | ||
float | pwm_value ) |
LED Driver 19 set pattern PWM value function.
This function is used to set PWM values of the selected pattern and channel.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | pattern_sel | : Pattern selection. |
[in] | channel_sel | : Channel selection. |
[in] | pwm_value | : PWM signal strength. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_sw_reset | ( | leddriver19_t * | ctx | ) |
LED Driver 19 software reset function.
This function is used to perform a software reset.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver19_write_reg | ( | leddriver19_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
LED Driver 19 I2C register writing function.
This function writes a byte of data in the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See leddriver19_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.