leddriver19 2.1.0.0
LED Driver 19 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ leddriver19_cfg_setup()

void leddriver19_cfg_setup ( leddriver19_cfg_t * cfg)

LED Driver 19 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See leddriver19_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ leddriver19_default_cfg()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ leddriver19_disable_channels()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
[in]channels_en: Channels that will be disabled.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_enable_channels()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
[in]channels_en: Channels that will be enabled.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_generic_read()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_generic_write()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_get_ch_current()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_get_int_data()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
[out]int_data: Interrupt register data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_get_int_pin()

uint8_t leddriver19_get_int_pin ( leddriver19_t * ctx)

LED Driver 19 get interrupt pin state function.

This function reads an interrupt pin state.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
Returns
Interrupt pin state.
Note
None.

◆ leddriver19_get_nc_led()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
[out]led_data: Open LED channels data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_read_reg()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_set_ch_current()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_set_pattern_pwm()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver19_sw_reset()

err_t leddriver19_sw_reset ( leddriver19_t * ctx)

LED Driver 19 software reset function.

This function is used to perform a software reset.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
All the set register values will be reset to factory values after using this function.

◆ leddriver19_write_reg()

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.

Parameters
[in]ctx: Click context object. See leddriver19_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.