c4x4rgb2 2.1.0.0
|
API for configuring and manipulating 4x4 RGB 2 Click driver. More...
Topics | |
4x4 RGB 2 Settings | |
Settings of 4x4 RGB 2 Click driver. | |
4x4 RGB 2 MikroBUS Map | |
MikroBUS pin mapping of 4x4 RGB 2 Click driver. | |
Functions | |
void | c4x4rgb2_cfg_setup (c4x4rgb2_cfg_t *cfg) |
4x4 RGB 2 configuration object setup function. | |
err_t | c4x4rgb2_init (c4x4rgb2_t *ctx, c4x4rgb2_cfg_t *cfg) |
4x4 RGB 2 initialization function. | |
err_t | c4x4rgb2_default_cfg (c4x4rgb2_t *ctx) |
4x4 RGB 2 default configuration function. | |
err_t | c4x4rgb2_write_leds (c4x4rgb2_t *ctx, c4x4rgb2_led_t *leds, uint8_t num_leds) |
4x4 RGB 2 write leds function. | |
err_t | c4x4rgb2_write_led_matrix (c4x4rgb2_t *ctx) |
4x4 RGB 2 write led matrix function. | |
void | c4x4rgb2_set_led_brightness (c4x4rgb2_t *ctx, uint8_t led_num, uint8_t brightness) |
4x4 RGB 2 set led brightness function. | |
void | c4x4rgb2_set_all_leds_brightness (c4x4rgb2_t *ctx, uint8_t brightness) |
4x4 RGB 2 set all leds brightness function. | |
void | c4x4rgb2_set_led_color (c4x4rgb2_t *ctx, uint8_t led_num, uint32_t rgb) |
4x4 RGB 2 set led color function. | |
void | c4x4rgb2_set_all_leds_color (c4x4rgb2_t *ctx, uint32_t rgb) |
4x4 RGB 2 set all leds color function. | |
API for configuring and manipulating 4x4 RGB 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 c4x4rgb2_cfg_setup | ( | c4x4rgb2_cfg_t * | cfg | ) |
4x4 RGB 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c4x4rgb2_cfg_t object definition for detailed explanation. |
err_t c4x4rgb2_default_cfg | ( | c4x4rgb2_t * | ctx | ) |
4x4 RGB 2 default configuration function.
This function executes a default configuration of 4x4 RGB 2 click board.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c4x4rgb2_init | ( | c4x4rgb2_t * | ctx, |
c4x4rgb2_cfg_t * | cfg ) |
4x4 RGB 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c4x4rgb2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c4x4rgb2_set_all_leds_brightness | ( | c4x4rgb2_t * | ctx, |
uint8_t | brightness ) |
4x4 RGB 2 set all leds brightness function.
This function sets the brightness of all leds in the led matrix to the selected level.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
[in] | brightness | : Brightness level (0 to 31). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c4x4rgb2_set_all_leds_color | ( | c4x4rgb2_t * | ctx, |
uint32_t | rgb ) |
4x4 RGB 2 set all leds color function.
This function sets the color of all leds in the led matrix to the selected level.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
[in] | rgb | : 24-bit RGB color (in a format RRGGBB). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c4x4rgb2_set_led_brightness | ( | c4x4rgb2_t * | ctx, |
uint8_t | led_num, | ||
uint8_t | brightness ) |
4x4 RGB 2 set led brightness function.
This function sets the brightness of the selected led in the led matrix.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
[in] | led_num | : LED number (0 to 15). |
[in] | brightness | : Brightness level (0 to 31). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c4x4rgb2_set_led_color | ( | c4x4rgb2_t * | ctx, |
uint8_t | led_num, | ||
uint32_t | rgb ) |
4x4 RGB 2 set led color function.
This function sets the color of the selected led in the led matrix.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
[in] | led_num | : LED number (0 to 15). |
[in] | rgb | : 24-bit RGB color (in a format RRGGBB). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c4x4rgb2_write_led_matrix | ( | c4x4rgb2_t * | ctx | ) |
4x4 RGB 2 write led matrix function.
This function writes the led matrix data from the click context object.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c4x4rgb2_write_leds | ( | c4x4rgb2_t * | ctx, |
c4x4rgb2_led_t * | leds, | ||
uint8_t | num_leds ) |
4x4 RGB 2 write leds function.
This function writes data to a desired number of leds starting from the LED 0 by using SPI serial interface.
[in] | ctx | : Click context object. See c4x4rgb2_t object definition for detailed explanation. |
[in] | leds | : LEDs data to be written. See c4x4rgb2_led_t object definition for detailed explanation. |
[in] | num_leds | : Number of LEDs to be written (up to 16 leds). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.