leddriver15 2.1.0.0
LED Driver 15 Click Driver

API for configuring and manipulating LED Driver 15 Click driver. More...

Topics

 LED Driver 15 Registers List
 List of registers of LED Driver 15 Click driver.
 
 LED Driver 15 Registers Settings
 Settings for registers of LED Driver 15 Click driver.
 
 LED Driver 15 MikroBUS Map
 MikroBUS pin mapping of LED Driver 15 Click driver.
 

Functions

void leddriver15_cfg_setup (leddriver15_cfg_t *cfg)
 LED Driver 15 configuration object setup function.
 
err_t leddriver15_init (leddriver15_t *ctx, leddriver15_cfg_t *cfg)
 LED Driver 15 initialization function.
 
err_t leddriver15_default_cfg (leddriver15_t *ctx)
 LED Driver 15 default configuration function.
 
err_t leddriver15_write_register (leddriver15_t *ctx, uint8_t reg, uint8_t data_in)
 LED Driver 15 write register function.
 
err_t leddriver15_read_register (leddriver15_t *ctx, uint8_t reg, uint8_t *data_out)
 LED Driver 15 read register function.
 
void leddriver15_enable_device (leddriver15_t *ctx)
 LED Driver 15 enable device function.
 
void leddriver15_disable_device (leddriver15_t *ctx)
 LED Driver 15 disable device function.
 
err_t leddriver15_set_i2c_dimming (leddriver15_t *ctx, uint8_t dimming)
 LED Driver 15 set i2c dimming function.
 

Detailed Description

API for configuring and manipulating LED Driver 15 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

◆ leddriver15_cfg_setup()

void leddriver15_cfg_setup ( leddriver15_cfg_t * cfg)

LED Driver 15 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ leddriver15_default_cfg()

err_t leddriver15_default_cfg ( leddriver15_t * ctx)

LED Driver 15 default configuration function.

This function executes a default configuration of LED Driver 15 click board.

Parameters
[in]ctx: Click context object. See leddriver15_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.

◆ leddriver15_disable_device()

void leddriver15_disable_device ( leddriver15_t * ctx)

LED Driver 15 disable device function.

This function disables the device by setting the EN pin to low logic state.

Parameters
[in]ctx: Click context object. See leddriver15_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ leddriver15_enable_device()

void leddriver15_enable_device ( leddriver15_t * ctx)

LED Driver 15 enable device function.

This function enables the device by setting the EN pin to high logic state.

Parameters
[in]ctx: Click context object. See leddriver15_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ leddriver15_init()

err_t leddriver15_init ( leddriver15_t * ctx,
leddriver15_cfg_t * cfg )

LED Driver 15 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See leddriver15_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See leddriver15_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver15_read_register()

err_t leddriver15_read_register ( leddriver15_t * ctx,
uint8_t reg,
uint8_t * data_out )

LED Driver 15 read register function.

This function reads data from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See leddriver15_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.

◆ leddriver15_set_i2c_dimming()

err_t leddriver15_set_i2c_dimming ( leddriver15_t * ctx,
uint8_t dimming )

LED Driver 15 set i2c dimming function.

This function sets the LEDs dimming level in I2C mode.

Parameters
[in]ctx: Click context object. See leddriver15_t object definition for detailed explanation.
[in]dimming: LEDs dimming level [0,31].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ leddriver15_write_register()

err_t leddriver15_write_register ( leddriver15_t * ctx,
uint8_t reg,
uint8_t data_in )

LED Driver 15 write register function.

This function writes data to the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See leddriver15_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.