Add function to clear screen only starting from given position to given length
This commit is contained in:
parent
2f5451d76e
commit
4b3ada594b
@ -722,3 +722,17 @@ void lcd_use_display(int ADisplay)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Clear characters at position until length
|
||||||
|
Input: start position and lentgh
|
||||||
|
Returns: none
|
||||||
|
*************************************************************************/
|
||||||
|
void lcd_clr(uint8_t pos, uint8_t len)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < len; i++) {
|
||||||
|
lcd_goto(pos + i);
|
||||||
|
lcd_putc(' ');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ void lcd_init();
|
|||||||
void lcd_command(uint8_t cmd);
|
void lcd_command(uint8_t cmd);
|
||||||
|
|
||||||
void lcd_clrscr();
|
void lcd_clrscr();
|
||||||
|
void lcd_clr(uint8_t pos, uint8_t len);
|
||||||
void lcd_home();
|
void lcd_home();
|
||||||
void lcd_goto(uint8_t pos);
|
void lcd_goto(uint8_t pos);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user