STM32F10x library
lcd.h
1 #ifndef MAT_LCD_H
2 #define MAT_LCD_H
3 
4 #include <inttypes.h>
5 
6 #define lcd_puti_lz(par1,par2) lcd_puti_lc(par1, 10, par2, '0')
7 #define lcd_puti(par1) lcd_puti_lc(par1, 10, 0, 0)
8 #define lcd_puth(par1) lcd_puti_lc(par1, 16, 0, 0)
9 
10 // initialize lcd
11 void lcd_init(void);
12 
13 // clear lcd
14 void lcd_clear(void);
15 
16 // write a char to lcd
17 void lcd_putc(const char c);
18 
19 // write a string from mem to lcd
20 uint8_t lcd_puts(const char* s);
21 
22 // position lcd cursor to line l
23 void lcd_line(const uint8_t l);
24 
25 // fill rest of the line with spaces
26 void lcd_endl(void);
27 
28 // write a string of length n from mem to lcd
29 void lcd_putsn(const char* s, uint8_t n);
30 
31 // write an integer to lcd, prepending with leading character
32 void lcd_puti_lc(const uint32_t a, uint8_t r, uint8_t l, char c);
33 
34 // write a float to the lcd with prec decimals
35 void lcd_putf(float f, uint8_t prec);
36 
37 // lcd backlight
38 void lcd_bl(uint8_t on);
39 
40 #endif
void lcd_putf(float f, uint8_t prec)
Write float with specified precision.
Definition: lcd.c:222
uint8_t lcd_puts(const char *s)
Write a string.
Definition: lcd.c:167
void lcd_clear(void)
Clear LCD.
Definition: lcd.c:51
void lcd_putsn(const char *s, uint8_t n)
Write n chars of string.
Definition: lcd.c:184
void lcd_puti_lc(const uint32_t a, uint8_t r, uint8_t l, char c)
Write int in the specified radix r of minlen w prepended by char c.
Definition: lcd.c:203
void lcd_line(const uint8_t y)
Position LCD cursor to the beginning of line y.
Definition: lcd.c:104
void lcd_putc(const char c)
Write a char.
Definition: lcd.c:113
void lcd_init(void)
Init LCD.
Definition: lcd.c:65
void lcd_endl(void)
Emulate endl by printing spaces until LCD width is reached.
Definition: lcd.c:145