ledflash3 2.1.0.0
|
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. | |
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.
void ledflash3_cfg_setup | ( | ledflash3_cfg_t * | cfg | ) |
LED Flash 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ledflash3_cfg_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See ledflash3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See ledflash3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See ledflash3_t object definition for detailed explanation. |
[in] | flash_current | : Flash current in mA. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See ledflash3_t object definition for detailed explanation. |
[in] | torch_current | : Torch current in mA. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ledflash3_strobe_pin | ( | ledflash3_t * | ctx | ) |
LED Flash 3 strobe function.
This function is used to generate strobe signal.
[in] | ctx | : Click context object. See ledflash3_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.