matrixrgb 2.0.0.0
|
Functions | |
void | matrixrgb_cfg_setup (matrixrgb_cfg_t *cfg) |
Config Object Initialization function. | |
MATRIXRGB_RETVAL | matrixrgb_init (matrixrgb_t *ctx, matrixrgb_cfg_t *cfg) |
Initialization function. | |
void | matrixrgb_pattern_settings (matrixrgb_t *ctx, uint8_t pattern_type, uint16_t pattern_delay_us) |
Click Pattern settings ( Default Configuration ) function. | |
void | matrixrgb_generic_transfer (matrixrgb_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | matrixrgb_device_reset (matrixrgb_t *ctx) |
Hard reset of the Matrix RGB click. | |
uint8_t | matrixrgb_device_settings (matrixrgb_t *ctx, uint8_t pattern_id) |
Firmware Initialization. | |
void | matrixrgb_set_power (matrixrgb_t *ctx, uint8_t power_state) |
Set Power. | |
void | matrixrgb_set_brightness (matrixrgb_t *ctx, uint8_t brightness) |
Set Brightness. | |
uint8_t | matrixrgb_write_pixel (matrixrgb_t *ctx, uint16_t x, uint16_t y, uint16_t color) |
Write Pixel. | |
void | matrixrgb_fill_screen (matrixrgb_t *ctx, uint16_t color) |
Fill Screen. | |
void | matrixrgb_draw_image (matrixrgb_t *ctx, const uint8_t *device_img) |
Draw Image on Panel. | |
void | matrixrgb_set_font (matrixrgb_t *ctx, matrixrgb_font_t *font_cfg) |
Set Font Function. | |
uint8_t | matrixrgb_write_text (matrixrgb_t *ctx, char *text, uint16_t x, uint16_t y) |
Writes Text. | |
void matrixrgb_cfg_setup | ( | matrixrgb_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void matrixrgb_device_reset | ( | matrixrgb_t * | ctx | ) |
Hard reset of the Matrix RGB click.
ctx | Click object. |
@description Function takes 300 ms.
uint8_t matrixrgb_device_settings | ( | matrixrgb_t * | ctx, |
uint8_t | pattern_id ) |
Firmware Initialization.
ctx | Click object. |
pattern_id | Panel Pattern ID - more info inside firmware documentation |
@description This function mus be executed right after driver initialization.
void matrixrgb_draw_image | ( | matrixrgb_t * | ctx, |
const uint8_t * | device_img ) |
Draw Image on Panel.
ctx | Click object. |
device_img | Pointer to image array |
void matrixrgb_fill_screen | ( | matrixrgb_t * | ctx, |
uint16_t | color ) |
Fill Screen.
ctx | Click object. |
color | color screen color |
void matrixrgb_generic_transfer | ( | matrixrgb_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
MATRIXRGB_RETVAL matrixrgb_init | ( | matrixrgb_t * | ctx, |
matrixrgb_cfg_t * | cfg ) |
Initialization function.
matrixrgb | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void matrixrgb_pattern_settings | ( | matrixrgb_t * | ctx, |
uint8_t | pattern_type, | ||
uint16_t | pattern_delay_us ) |
Click Pattern settings ( Default Configuration ) function.
ctx | Click object. |
pattern_type | Pattern type of display. |
pattern_delay_us | Choose time for delay. |
@description This function executes default configuration for Matrix RGB click.
void matrixrgb_set_brightness | ( | matrixrgb_t * | ctx, |
uint8_t | brightness ) |
Set Brightness.
ctx | Click object. |
brightness | Brightness intensity |
void matrixrgb_set_font | ( | matrixrgb_t * | ctx, |
matrixrgb_font_t * | font_cfg ) |
Set Font Function.
ctx | Click object. |
font_cfg | Pointer on structure |
@description Must be called before write text function to adjust text related properties.
void matrixrgb_set_power | ( | matrixrgb_t * | ctx, |
uint8_t | power_state ) |
Set Power.
ctx | Click object. |
power_state | Power State (0 - OFF / 1 - ON) |
uint8_t matrixrgb_write_pixel | ( | matrixrgb_t * | ctx, |
uint16_t | x, | ||
uint16_t | y, | ||
uint16_t | color ) |
Write Pixel.
ctx | Click object. |
x | horizontal position |
y | vertical position |
color | pixel color |
uint8_t matrixrgb_write_text | ( | matrixrgb_t * | ctx, |
char * | text, | ||
uint16_t | x, | ||
uint16_t | y ) |
Writes Text.
ctx | Click object. |
text | |
x | Horizontal offset |
y | Vertical offset |
@description Writing starts at provided offset