ledring2 2.1.0.0
|
API for configuring and manipulating LED Ring 2 Click driver. More...
Topics | |
LED Ring 2 Registers List | |
List of registers of LED Ring 2 Click driver. | |
LED Ring 2 Registers Settings | |
Settings for registers of LED Ring 2 Click driver. | |
LED Ring 2 MikroBUS Map | |
MikroBUS pin mapping of LED Ring 2 Click driver. | |
Functions | |
void | ledring2_cfg_setup (ledring2_cfg_t *cfg) |
LED Ring 2 configuration object setup function. | |
err_t | ledring2_init (ledring2_t *ctx, ledring2_cfg_t *cfg) |
LED Ring 2 initialization function. | |
err_t | ledring2_default_cfg (ledring2_t *ctx) |
LED Ring 2 default configuration function. | |
err_t | ledring2_set_slave_address (ledring2_t *ctx, uint8_t slave_address) |
Set I2C Slave address. | |
err_t | ledring2_write_reg (ledring2_t *ctx, uint8_t led_group, uint16_t reg, uint8_t *data_in, uint8_t len) |
LED Ring 2 write register function. | |
err_t | ledring2_read_reg (ledring2_t *ctx, uint8_t led_group, uint16_t reg, uint8_t *data_out, uint8_t len) |
LED Ring 2 read registe function. | |
void | ledring2_set_vsync (ledring2_t *ctx) |
LED Ring 2 read registe function. | |
err_t | ledring2_enable (ledring2_t *ctx) |
LED Ring 2 enable function. | |
err_t | ledring2_disable (ledring2_t *ctx) |
LED Ring 2 disable function. | |
err_t | ledring2_set_all_led_state (ledring2_t *ctx, ledring2_led_state_t led_state) |
LED Ring 2 set all LED state function. | |
err_t | ledring2_set_led_pos_state (ledring2_t *ctx, uint8_t led_pos, ledring2_led_state_t led_state) |
LED Ring 2 set LED state function. | |
err_t | ledring2_set_led_brightness (ledring2_t *ctx, uint8_t led_pos, uint16_t led_brightness) |
LED Ring 2 set LED brightness function. | |
API for configuring and manipulating LED Ring 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ledring2_cfg_setup | ( | ledring2_cfg_t * | cfg | ) |
LED Ring 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ledring2_cfg_t object definition for detailed explanation. |
err_t ledring2_default_cfg | ( | ledring2_t * | ctx | ) |
LED Ring 2 default configuration function.
This function executes a default configuration of LED Ring 2 click board.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_disable | ( | ledring2_t * | ctx | ) |
LED Ring 2 disable function.
This function disable the LP5862, 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_enable | ( | ledring2_t * | ctx | ) |
LED Ring 2 enable function.
This function enable the LP5862, 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_init | ( | ledring2_t * | ctx, |
ledring2_cfg_t * | cfg ) |
LED Ring 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ledring2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_read_reg | ( | ledring2_t * | ctx, |
uint8_t | led_group, | ||
uint16_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
LED Ring 2 read registe function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface of the LP5862 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | led_group | :
|
[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 ledring2_set_all_led_state | ( | ledring2_t * | ctx, |
ledring2_led_state_t | led_state ) |
LED Ring 2 set all LED state function.
This function sets the state of all LEDs of the LP5862 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | led_state | : LED state. See ledring2_led_state_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_set_led_brightness | ( | ledring2_t * | ctx, |
uint8_t | led_pos, | ||
uint16_t | led_brightness ) |
LED Ring 2 set LED brightness function.
This function sets the desired LED brightness depending on the LED position selection of the LP5862 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | led_pos | : LED position from 1 to 54. |
[in] | led_brightness | : LED brightness. See ledring2_led_state_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_set_led_pos_state | ( | ledring2_t * | ctx, |
uint8_t | led_pos, | ||
ledring2_led_state_t | led_state ) |
LED Ring 2 set LED state function.
This function sets the desired LED state depending on the LED position selection of the LP5862 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | led_pos | : LED position from 1 to 54. |
[in] | led_state | : LED state. See ledring2_led_state_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ledring2_set_slave_address | ( | ledring2_t * | ctx, |
uint8_t | slave_address ) |
Set I2C Slave address.
Sets I2C address of the subordinate I2C device to slave_address
which is targeted by read and write operations.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | slave_address | Specified I2C slave address:
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void ledring2_set_vsync | ( | ledring2_t * | ctx | ) |
LED Ring 2 read registe function.
This function set synchronizes signal pulse for display mode 2 and mode 3 of the LP5862 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
err_t ledring2_write_reg | ( | ledring2_t * | ctx, |
uint8_t | led_group, | ||
uint16_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
LED Ring 2 write register function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface of the LP5862 2×18 LED Matrix Driver With 8-Bit Analog and 8-/16-Bit PWM Dimming on the LED Ring 2 Click board™.
[in] | ctx | : Click context object. See ledring2_t object definition for detailed explanation. |
[in] | led_group | :
|
[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.