ledflash3 2.1.0.0
LED Flash 3 Click Driver

API for configuring and manipulating LED Flash 3 Click driver. More...

Topics

 LED Flash 3 Registers List
 List of registers of LED Flash 3 Click driver.
 
 LED Flash 3 Registers Settings
 Settings for registers of LED Flash 3 Click driver.
 
 LED Flash 3 MikroBUS Map
 MikroBUS pin mapping of LED Flash 3 Click driver.
 

Functions

void ledflash3_cfg_setup (ledflash3_cfg_t *cfg)
 LED Flash 3 configuration object setup function.
 
err_t ledflash3_init (ledflash3_t *ctx, ledflash3_cfg_t *cfg)
 LED Flash 3 initialization function.
 
err_t ledflash3_default_cfg (ledflash3_t *ctx)
 LED Flash 3 default configuration function.
 
err_t ledflash3_generic_write (ledflash3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 LED Flash 3 I2C writing function.
 
err_t ledflash3_generic_read (ledflash3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 LED Flash 3 I2C reading function.
 
err_t ledflash3_write_reg (ledflash3_t *ctx, uint8_t reg, uint8_t data_in)
 LED Flash 3 register writing function.
 
err_t ledflash3_read_reg (ledflash3_t *ctx, uint8_t reg, uint8_t *data_out)
 LED Flash 3 regiister reading function.
 
void ledflash3_strobe_pin (ledflash3_t *ctx)
 LED Flash 3 strobe function.
 
err_t ledflash3_set_flash_current (ledflash3_t *ctx, float flash_current)
 LED Flash 3 set flash current function.
 
err_t ledflash3_set_torch_current (ledflash3_t *ctx, float torch_current)
 LED Flash 3 set torch current function.
 

Detailed Description

API for configuring and manipulating LED Flash 3 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

◆ ledflash3_cfg_setup()

void ledflash3_cfg_setup ( ledflash3_cfg_t * cfg)

LED Flash 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ ledflash3_default_cfg()

err_t ledflash3_default_cfg ( ledflash3_t * ctx)

LED Flash 3 default configuration function.

This function executes a default configuration of LED Flash 3 click board.

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

◆ ledflash3_generic_read()

err_t ledflash3_generic_read ( ledflash3_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

LED Flash 3 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 ledflash3_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.

◆ ledflash3_generic_write()

err_t ledflash3_generic_write ( ledflash3_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

LED Flash 3 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 ledflash3_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.

◆ ledflash3_init()

err_t ledflash3_init ( ledflash3_t * ctx,
ledflash3_cfg_t * cfg )

LED Flash 3 initialization function.

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

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

◆ ledflash3_read_reg()

err_t ledflash3_read_reg ( ledflash3_t * ctx,
uint8_t reg,
uint8_t * data_out )

LED Flash 3 regiister reading function.

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

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

◆ ledflash3_set_flash_current()

err_t ledflash3_set_flash_current ( ledflash3_t * ctx,
float flash_current )

LED Flash 3 set flash current function.

This function is used to set flash current value in mA.

Parameters
[in]ctx: Click context object. See ledflash3_t object definition for detailed explanation.
[in]flash_current: Flash current in mA.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ledflash3_set_torch_current()

err_t ledflash3_set_torch_current ( ledflash3_t * ctx,
float torch_current )

LED Flash 3 set torch current function.

This function is used to set torch current value in mA.

Parameters
[in]ctx: Click context object. See ledflash3_t object definition for detailed explanation.
[in]torch_current: Torch current in mA.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ledflash3_strobe_pin()

void ledflash3_strobe_pin ( ledflash3_t * ctx)

LED Flash 3 strobe function.

This function is used to generate strobe signal.

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

◆ ledflash3_write_reg()

err_t ledflash3_write_reg ( ledflash3_t * ctx,
uint8_t reg,
uint8_t data_in )

LED Flash 3 register writing function.

This function writes a data byte into the selected register by using I2C serial interface.

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