DMCP interface
03.15_020
|
LCD graphics and buffer commands. More...
Modules | |
Graphics defines | |
Functions | |
void | lcd_clear_buf () |
Clear LCD buffer. | |
void | lcd_refresh () |
Start lcd refresh - could be blocking or non-blocking based on current system default (only dirty lines are updated) | |
void | lcd_refresh_dma () |
Start non-blocking LCD refresh, LCD refresh continues in background (only dirty lines are updated) | |
void | lcd_refresh_wait () |
Issue LCD refresh and wait until done (only dirty lines are updated) | |
void | lcd_forced_refresh () |
Write immediately whole LCD buffer to LCD regardless of dirty flags. | |
void | lcd_refresh_lines (int ln, int cnt) |
Write immediately lines [ln .. ln+cnt-1] to LCD. | |
void | bitblt24 (uint32_t x, uint32_t dx, uint32_t y, uint32_t val, int blt_op, int fill) |
Blits dx bits from val at position x , y . More... | |
uint8_t * | lcd_line_addr (int y) |
Returns pointer to line data (doesn't depend on LCD_INVERT_XAXIS) | |
void | lcd_fill_rect (uint32_t x, uint32_t y, uint32_t dx, uint32_t dy, int val) |
Fills rectangular area of LCD. More... | |
void | lcd_fill_ptrn (int x, int y, int dx, int dy, int ptrn1, int ptrn2) |
Fills rectangular area with prescribed pattern. More... | |
void | lcd_fillLine (int ln, uint8_t val) |
Fill LCD line with value. More... | |
void | lcd_fillLines (int ln, uint8_t val, int cnt) |
Fill LCD lines with value. More... | |
void | lcd_set_buf_cleared (int val) |
Sets 'LCD buffer cleared' flag. More... | |
int | lcd_get_buf_cleared () |
Reads 'LCD buffer cleared' flag. More... | |
uint8_t | reverse_byte (uint8_t x) |
Swaps bits in byte. More... | |
LCD graphics and buffer commands.
LCD hardware doesn't provide any means to access once written graphics data. Therefore system has to provide graphics buffer to hold LCD data and tracks access to separate LCD lines to optimize LCD refresh operations.
void bitblt24 | ( | uint32_t | x, |
uint32_t | dx, | ||
uint32_t | y, | ||
uint32_t | val, | ||
int | blt_op, | ||
int | fill | ||
) |
Blits dx
bits from val
at position x
, y
.
x | Position x |
dx | (1-24) Width x |
y | Position y |
val | Value to blit |
blt_op | Blit operation BLT_OR, BLT_ANDN or BLT_XOR |
fill | BLT_SET or BLT_NONE |
Value of fill
doesn't apply for BLT_XOR.
BLT_NONE doesn't affect any blit operation.
BLT_SET affects src value of blit operation:
void lcd_fill_ptrn | ( | int | x, |
int | y, | ||
int | dx, | ||
int | dy, | ||
int | ptrn1, | ||
int | ptrn2 | ||
) |
Fills rectangular area with prescribed pattern.
x | Position x |
y | Position y |
dx | Width x |
dy | Width y |
ptrn1 | Pattern for even lines |
ptrn2 | Pattern for odd lines |
void lcd_fill_rect | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | dx, | ||
uint32_t | dy, | ||
int | val | ||
) |
Fills rectangular area of LCD.
x | Position x |
y | Position y |
dx | Width x |
dy | Width y |
val | LCD_EMPTY_VALUE or LCD_SET_VALUE |
void lcd_fillLine | ( | int | ln, |
uint8_t | val | ||
) |
Fill LCD line with value.
ln | Line number |
val | Data to fill |
Written value isn't affected by LCD_INVERT_DATA flag.
void lcd_fillLines | ( | int | ln, |
uint8_t | val, | ||
int | cnt | ||
) |
Fill LCD lines with value.
ln | Starting line number |
val | Data to fill |
cnt | Number of lines to fill |
Written value isn't affected by LCD_INVERT_DATA flag.
int lcd_get_buf_cleared | ( | ) |
Reads 'LCD buffer cleared' flag.
'LCD buffer cleared' flag is set by system every time the LCD buffer is cleared. User can clear this flag and detect later in code whether LCD screen was cleared from other part of program or system and thus optimize screen repaints.
void lcd_set_buf_cleared | ( | int | val | ) |
uint8_t reverse_byte | ( | uint8_t | x | ) |
Swaps bits in byte.
x | Data to swap |