c10x10rgb2
2.1.0.0
|
API for configuring and manipulating 10x10 RGB 2 Click driver. More...
Modules | |
10x10 RGB 2 Settings | |
Settings of 10x10 RGB 2 Click driver. | |
10x10 RGB 2 MikroBUS Map | |
MikroBUS pin mapping of 10x10 RGB 2 Click driver. | |
Functions | |
void | c10x10rgb2_cfg_setup (c10x10rgb2_cfg_t *cfg) |
10x10 RGB 2 configuration object setup function. More... | |
err_t | c10x10rgb2_init (c10x10rgb2_t *ctx, c10x10rgb2_cfg_t *cfg) |
10x10 RGB 2 initialization function. More... | |
err_t | c10x10rgb2_default_cfg (c10x10rgb2_t *ctx) |
10x10 RGB 2 default configuration function. More... | |
err_t | c10x10rgb2_write_leds (c10x10rgb2_t *ctx, c10x10rgb2_led_t *leds, uint16_t num_leds) |
10x10 RGB 2 write leds function. More... | |
err_t | c10x10rgb2_write_led_matrix (c10x10rgb2_t *ctx) |
10x10 RGB 2 write led matrix function. More... | |
void | c10x10rgb2_set_led_brightness (c10x10rgb2_t *ctx, uint16_t led_num, uint8_t brightness) |
10x10 RGB 2 set led brightness function. More... | |
void | c10x10rgb2_set_leds_brightness (c10x10rgb2_t *ctx, uint8_t brightness) |
10x10 RGB 2 set leds brightness function. More... | |
void | c10x10rgb2_set_led_color (c10x10rgb2_t *ctx, uint16_t led_num, uint32_t rgb) |
10x10 RGB 2 set led color function. More... | |
void | c10x10rgb2_set_leds_color (c10x10rgb2_t *ctx, uint32_t rgb) |
10x10 RGB 2 set leds color function. More... | |
uint32_t | c10x10rgb2_make_color (uint8_t red, uint8_t green, uint8_t blue, uint8_t rgb_pct) |
10x10 RGB 2 make color function. More... | |
uint32_t | c10x10rgb2_color_wheel (uint8_t wheel_pos, uint8_t rgb_pct) |
10x10 RGB 2 color wheel function. More... | |
err_t | c10x10rgb2_fill_screen (c10x10rgb2_t *ctx, uint32_t rgb) |
10x10 RGB 2 fill screen function. More... | |
void | c10x10rgb2_set_pen (c10x10rgb2_t *ctx, uint32_t txt_rgb, uint32_t bg_rgb, uint8_t rotation) |
10x10 RGB 2 set pen function. More... | |
err_t | c10x10rgb2_write_char (c10x10rgb2_t *ctx, uint8_t data_in) |
10x10 RGB 2 write char function. More... | |
err_t | c10x10rgb2_write_string (c10x10rgb2_t *ctx, uint8_t *data_in, uint16_t speed_ms) |
10x10 RGB 2 write char function. More... | |
err_t | c10x10rgb2_draw_picture (c10x10rgb2_t *ctx, const uint32_t *image) |
10x10 RGB 2 draw picture function. More... | |
err_t | c10x10rgb2_demo_rainbow (c10x10rgb2_t *ctx, uint8_t rgb_pct, uint16_t upd_rate_ms, uint16_t upd_num) |
10x10 RGB 2 demo rainbow function. More... | |
API for configuring and manipulating 10x10 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 c10x10rgb2_cfg_setup | ( | c10x10rgb2_cfg_t * | cfg | ) |
10x10 RGB 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c10x10rgb2_cfg_t object definition for detailed explanation. |
uint32_t c10x10rgb2_color_wheel | ( | uint8_t | wheel_pos, |
uint8_t | rgb_pct | ||
) |
10x10 RGB 2 color wheel function.
This function creates a 24-bit RGB color based on the color wheel input parameters.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | wheel_pos | : Color wheel position (modulo 255). |
[in] | rgb_pct | : Percent of RGB color (1-100). |
err_t c10x10rgb2_default_cfg | ( | c10x10rgb2_t * | ctx | ) |
10x10 RGB 2 default configuration function.
This function executes a default configuration of 10x10 RGB 2 click board.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c10x10rgb2_demo_rainbow | ( | c10x10rgb2_t * | ctx, |
uint8_t | rgb_pct, | ||
uint16_t | upd_rate_ms, | ||
uint16_t | upd_num | ||
) |
10x10 RGB 2 demo rainbow function.
This function performs a colorfull "rainbow" demo for a desired period.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | rgb_pct | : Percent of RGB color (1-100). |
[in] | upd_rate_ms | : Screen update delay in milliseconds. |
[in] | upd_num | : Number of screen updates. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c10x10rgb2_draw_picture | ( | c10x10rgb2_t * | ctx, |
const uint32_t * | image | ||
) |
10x10 RGB 2 draw picture function.
This function draws a 10x10px picture on the screen.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | image | : 10x10 image in a 24-bit RGB color format (RRGGBB). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c10x10rgb2_fill_screen | ( | c10x10rgb2_t * | ctx, |
uint32_t | rgb | ||
) |
10x10 RGB 2 fill screen function.
This function fills the entire screen with the specified color.
[in] | ctx | : Click context object. See c10x10rgb2_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. err_t c10x10rgb2_init | ( | c10x10rgb2_t * | ctx, |
c10x10rgb2_cfg_t * | cfg | ||
) |
10x10 RGB 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c10x10rgb2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint32_t c10x10rgb2_make_color | ( | uint8_t | red, |
uint8_t | green, | ||
uint8_t | blue, | ||
uint8_t | rgb_pct | ||
) |
10x10 RGB 2 make color function.
This function creates a 24-bit RGB color based on the RGB input parameters.
[in] | red | : Red color byte. |
[in] | green | : Green color byte. |
[in] | blue | : Blue color byte. |
[in] | rgb_pct | : Percent of RGB color (1-100). |
void c10x10rgb2_set_led_brightness | ( | c10x10rgb2_t * | ctx, |
uint16_t | led_num, | ||
uint8_t | brightness | ||
) |
10x10 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 c10x10rgb2_t object definition for detailed explanation. |
[in] | led_num | : LED number (0 to 99). |
[in] | brightness | : Brightness level (0 to 31). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c10x10rgb2_set_led_color | ( | c10x10rgb2_t * | ctx, |
uint16_t | led_num, | ||
uint32_t | rgb | ||
) |
10x10 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 c10x10rgb2_t object definition for detailed explanation. |
[in] | led_num | : LED number (0 to 99). |
[in] | rgb | : 24-bit RGB color (in a format RRGGBB). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c10x10rgb2_set_leds_brightness | ( | c10x10rgb2_t * | ctx, |
uint8_t | brightness | ||
) |
10x10 RGB 2 set 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 c10x10rgb2_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 c10x10rgb2_set_leds_color | ( | c10x10rgb2_t * | ctx, |
uint32_t | rgb | ||
) |
10x10 RGB 2 set 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 c10x10rgb2_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 c10x10rgb2_set_pen | ( | c10x10rgb2_t * | ctx, |
uint32_t | txt_rgb, | ||
uint32_t | bg_rgb, | ||
uint8_t | rotation | ||
) |
10x10 RGB 2 set pen function.
This function sets the pen configuration for text writing.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | txt_rgb | : Text 24-bit RGB level: 0xRRGGBB. |
[in] | bg_rgb | : Background 24-bit RGB level: 0xRRGGBB. |
[in] | rotation | : ASCII byte rotation:
|
err_t c10x10rgb2_write_char | ( | c10x10rgb2_t * | ctx, |
uint8_t | data_in | ||
) |
10x10 RGB 2 write char function.
This function writes a single ASCII character in a 8x8 font size.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | data_in | : ASCII(32-122) char to write. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c10x10rgb2_write_led_matrix | ( | c10x10rgb2_t * | ctx | ) |
10x10 RGB 2 write led matrix function.
This function writes the led matrix data from the click context object.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c10x10rgb2_write_leds | ( | c10x10rgb2_t * | ctx, |
c10x10rgb2_led_t * | leds, | ||
uint16_t | num_leds | ||
) |
10x10 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 c10x10rgb2_t object definition for detailed explanation. |
[in] | leds | : LEDs data to be written. See c10x10rgb2_led_t object definition for detailed explanation. |
[in] | num_leds | : Number of LEDs to be written (up to 100 leds). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c10x10rgb2_write_string | ( | c10x10rgb2_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | speed_ms | ||
) |
10x10 RGB 2 write char function.
This function writes a text string in a 8x8 font size by scrolling characters to the left side.
[in] | ctx | : Click context object. See c10x10rgb2_t object definition for detailed explanation. |
[in] | data_in | : ASCII(32-122) string to write (must end with \0). |
[in] | speed_ms | : Screen refresh delay in milliseconds which presents a scrolling speed. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.