leddriver9 2.0.0.0
|
API for configuring and manipulating LED Driver 9 Click driver. More...
Topics | |
LED Driver 9 Registers List | |
List of registers of LED Driver 9 Click driver. | |
LED Driver 9 Registers Settings | |
Settings for registers of LED Driver 9 Click driver. | |
LED Driver 9 MikroBUS Map | |
MikroBUS pin mapping of LED Driver 9 Click driver. | |
Functions | |
void | leddriver9_cfg_setup (leddriver9_cfg_t *cfg) |
LED Driver 9 configuration object setup function. | |
err_t | leddriver9_init (leddriver9_t *ctx, leddriver9_cfg_t *cfg) |
LED Driver 9 initialization function. | |
void | leddriver9_default_cfg (leddriver9_t *ctx) |
LED Driver 9 default configuration function. | |
err_t | leddriver9_generic_write (leddriver9_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
LED Driver 9 I2C writing function. | |
err_t | leddriver9_generic_read (leddriver9_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
LED Driver 9 I2C reading function. | |
err_t | leddriver9_mode1_reg_write (leddriver9_t *ctx, leddriver9_mode_reg_t *mode_reg) |
LED Driver 9 MODE1 reg write function. | |
err_t | leddriver9_mode1_reg_read (leddriver9_t *ctx, leddriver9_mode_reg_t *mode_reg) |
LED Driver 9 MODE1 reg read function. | |
err_t | leddriver9_mode2_reg_write (leddriver9_t *ctx, leddriver9_mode_reg_t *mode_reg) |
LED Driver 9 MODE2 reg write function. | |
err_t | leddriver9_mode2_reg_read (leddriver9_t *ctx, leddriver9_mode_reg_t *mode_reg) |
LED Driver 9 MODE2 reg read function. | |
err_t | leddriver9_ledout_state (leddriver9_t *ctx, leddriver9_output_state_t *output_state) |
LED Driver 9 LEDOUT state function. | |
err_t | leddriver9_set_pwm (leddriver9_t *ctx, leddriver9_channel_sel_t ch_out, float duty_cycle) |
LED Driver 9 set PWM function. | |
err_t | leddriver9_set_dimmer_pwm (leddriver9_t *ctx, float duty_cycle) |
LED Driver 9 set dimmer PWM function. | |
err_t | leddriver9_set_blink_period (leddriver9_t *ctx, float period) |
LED Driver 9 set blink period function. | |
void | leddriver9_hardware_reset (leddriver9_t *ctx) |
LED Driver 9 hardware reset function. | |
API for configuring and manipulating LED Driver 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void leddriver9_cfg_setup | ( | leddriver9_cfg_t * | cfg | ) |
LED Driver 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See leddriver9_cfg_t object definition for detailed explanation. |
void leddriver9_default_cfg | ( | leddriver9_t * | ctx | ) |
LED Driver 9 default configuration function.
This function executes a default configuration of LED Driver 9 click board.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
err_t leddriver9_generic_read | ( | leddriver9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
LED Driver 9 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 leddriver9_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t leddriver9_generic_write | ( | leddriver9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
LED Driver 9 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 leddriver9_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.void leddriver9_hardware_reset | ( | leddriver9_t * | ctx | ) |
LED Driver 9 hardware reset function.
This function performs the hardware reset on the device.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
err_t leddriver9_init | ( | leddriver9_t * | ctx, |
leddriver9_cfg_t * | cfg ) |
LED Driver 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See leddriver9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t leddriver9_ledout_state | ( | leddriver9_t * | ctx, |
leddriver9_output_state_t * | output_state ) |
LED Driver 9 LEDOUT state function.
This function configures the LEDOUTx registers from the defined config structure.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | output_state | : Output state config structure. |
0
- Success, -1
- Error.err_t leddriver9_mode1_reg_read | ( | leddriver9_t * | ctx, |
leddriver9_mode_reg_t * | mode_reg ) |
LED Driver 9 MODE1 reg read function.
This function acquires the data from the MODE1 register and stores the content in the defined config structure.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[out] | mode_reg | : Mode reg config structure. |
0
- Success, -1
- Error.err_t leddriver9_mode1_reg_write | ( | leddriver9_t * | ctx, |
leddriver9_mode_reg_t * | mode_reg ) |
LED Driver 9 MODE1 reg write function.
This function configures the MODE1 register from the defined config structure.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | mode_reg | : Mode reg config structure. |
0
- Success, -1
- Error.err_t leddriver9_mode2_reg_read | ( | leddriver9_t * | ctx, |
leddriver9_mode_reg_t * | mode_reg ) |
LED Driver 9 MODE2 reg read function.
This function acquires the data from the MODE2 register and stores the content in the defined config structure.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[out] | mode_reg | : Mode reg config structure. |
0
- Success, -1
- Error.err_t leddriver9_mode2_reg_write | ( | leddriver9_t * | ctx, |
leddriver9_mode_reg_t * | mode_reg ) |
LED Driver 9 MODE2 reg write function.
This function configures the MODE2 register from the defined config structure.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | mode_reg | : Mode reg config structure. |
0
- Success, -1
- Error.err_t leddriver9_set_blink_period | ( | leddriver9_t * | ctx, |
float | period ) |
LED Driver 9 set blink period function.
This function sets the group frequency period ( GRPFREQ ) which will result with LED blinking after the defined time.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | period | : Time period in seconds. |
0
- Success, -1
- Error.err_t leddriver9_set_dimmer_pwm | ( | leddriver9_t * | ctx, |
float | duty_cycle ) |
LED Driver 9 set dimmer PWM function.
This function sets the group PWM duty cycle ( GRPPWM ) which can be used for dimming already set PWM channels.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | duty_cycle | : Duty cycle value ranging from 0 to 100. |
0
- Success, -1
- Error.err_t leddriver9_set_pwm | ( | leddriver9_t * | ctx, |
leddriver9_channel_sel_t | ch_out, | ||
float | duty_cycle ) |
LED Driver 9 set PWM function.
This function sets the PWM duty cycle on selected ledout channel.
[in] | ctx | : Click context object. See leddriver9_t object definition for detailed explanation. |
[in] | ch_out | : Channel selection. |
[in] | duty_cycle | : Duty cycle value ranging from 0 to 100. |
0
- Success, -1
- Error.