add lcd_char2() to write to chars 2+3

This commit is contained in:
Pavel Semerad
2012-04-19 13:30:41 +02:00
parent aed03268f7
commit 798837d912
2 changed files with 8 additions and 0 deletions

7
lcd.c
View File

@@ -599,6 +599,13 @@ void lcd_chars(u8 *chars) {
}
// write 2 chars to chars 2+3
void lcd_chars2(u8 *chars) {
lcd_char(LCHR2, *chars++);
lcd_char(LCHR3, *chars++);
}
// common conversion to 2 chars
static u8 chr[3]; // results of number->string conversions
static void lcd_num2char(u8 num) {

1
lcd.h
View File

@@ -92,6 +92,7 @@ extern void lcd_set_blink(u8 id, u8 on_off);
#define L7SEG_MAX 15
extern void lcd_char(u8 id, u8 c); // id the same as in lcd_set()
extern void lcd_chars(u8 *chars); // 3 chars
extern void lcd_chars2(u8 *chars); // 2 chars to chars 2+3
extern void lcd_char_num3(s16 num); // num -199...1099 to 3 chars
extern void lcd_char_num2_lbl(s8 num, u8 *labels); // num -99..99 with labels for <0, =0, >0
extern void lcd_7seg(u8 number); // num 0-15 (>=10 as hexa numbers)