diff --git a/lib/hd44780_111/hd44780.c b/lib/hd44780_111/hd44780.c index d00deae..0e1dda7 100755 --- a/lib/hd44780_111/hd44780.c +++ b/lib/hd44780_111/hd44780.c @@ -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(' '); + } + } + diff --git a/lib/hd44780_111/hd44780.h b/lib/hd44780_111/hd44780.h index 19b47de..f486b43 100755 --- a/lib/hd44780_111/hd44780.h +++ b/lib/hd44780_111/hd44780.h @@ -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);