From 798837d9128c81171484e7a107cdc4a0a5d8d340 Mon Sep 17 00:00:00 2001 From: Pavel Semerad Date: Thu, 19 Apr 2012 13:30:41 +0200 Subject: [PATCH] add lcd_char2() to write to chars 2+3 --- lcd.c | 7 +++++++ lcd.h | 1 + 2 files changed, 8 insertions(+) diff --git a/lcd.c b/lcd.c index d062faf..b3a5c3c 100644 --- a/lcd.c +++ b/lcd.c @@ -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) { diff --git a/lcd.h b/lcd.h index 9d6ef26..0979630 100644 --- a/lcd.h +++ b/lcd.h @@ -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)