Add function to clear screen only starting from given position to given length

This commit is contained in:
Silver Kits 2016-10-04 22:03:41 +03:00
parent 2f5451d76e
commit 4b3ada594b
2 changed files with 15 additions and 0 deletions

View File

@ -722,3 +722,17 @@ void lcd_use_display(int ADisplay)
}
#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(' ');
}
}

View File

@ -49,6 +49,7 @@ void lcd_init();
void lcd_command(uint8_t cmd);
void lcd_clrscr();
void lcd_clr(uint8_t pos, uint8_t len);
void lcd_home();
void lcd_goto(uint8_t pos);