AVR library
lcd.h
1 #ifndef MAT_LCD_H
2 #define MAT_LCD_H
3 
4 #include <inttypes.h>
5 #include <avr/pgmspace.h>
6 
7 #define lcd_puti_lz(par1,par2) lcd_puti_lc(par1, 10, par2, '0')
8 #define lcd_puti(par1) lcd_puti_lc(par1, 10, 0, 0)
9 #define lcd_puth(par1) lcd_puti_lc(par1, 16, 0, 0)
10 
11 // initialize lcd
12 uint8_t lcd_init(uint8_t p1);
13 
14 // clear lcd
15 void lcd_clear(void);
16 
17 // write a char to lcd
18 void lcd_putc(const char c);
19 
20 // write a string from mem to lcd
21 uint8_t lcd_puts(const char* s);
22 
23 // position lcd cursor to line l
24 void lcd_line(const uint8_t l);
25 
26 // fill rest of the line with spaces
27 void lcd_endl(void);
28 
29 // write a string of length n from mem to lcd
30 void lcd_putsn(const char* s, uint8_t n);
31 
32 // write a string from progmem to lcd
33 void lcd_puts_P(PGM_P s);
34 
35 // write an integer to lcd, prepending with leading character
36 void lcd_puti_lc(const uint32_t a, uint8_t r, uint8_t l, char c);
37 
38 // write a float to the lcd with prec decimals
39 void lcd_putf(float f, uint8_t prec);
40 
41 // lcd backlight
42 void lcd_bl(uint8_t on);
43 
44 #endif
void lcd_line(const uint8_t l)
Position LCD cursor to the beginning of line y.
Definition: lcd.c:113
void lcd_clear(void)
Clear LCD.
Definition: lcd.c:57
void lcd_putc(const char c)
Write a char.
Definition: lcd.c:122
uint8_t lcd_init(uint8_t p1)
Init LCD.
Definition: lcd.c:71