diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-02-20 17:50:47 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-02-20 17:50:47 -0500 |
commit | f27b19a531a61aa088d380174cc960b9f2e68237 (patch) | |
tree | 57830178579ee20dbc0c14b280fdbc7bd59a53a9 /include/lcd.h | |
parent | b0cd81cf66c0e5b5d0d662384752337f6c69cde5 (diff) |
major work, own malloc, making things work
Diffstat (limited to 'include/lcd.h')
-rw-r--r-- | include/lcd.h | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/include/lcd.h b/include/lcd.h index 441d463..378aac4 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -1,23 +1,63 @@ +/** + * @file lcd.h + * A basic library for writing a 16x2 text LCD. + */ + #ifndef LCD_H_ #define LCD_H_ #include <stdint.h> /** - * Direct access + * A handler/task to manage asyncronous LCD writes. + */ +void lcd_handler(void); + +/** + * Writes a string asyncronously to the LCD. + * The lcd_handler task must be running for the string to actually be printed. + * @param s the string to write + */ +void lcd_put(const char *s); + +// +// The following functions do not support asyncronous calls. +// + +/** + * Initializes the LCD. */ void lcd_init(void); +/** + * Writes a string to the LCD. + * A cursor position is kept internally. When the end of the screen is reached, + * writing resumes at the first position. + * @param s the string to write + */ void lcd_puts(const char *s); + +/** + * Writes a base 10 integer to the screen. + * @param i the integer to print + */ void lcd_puti(int i); + +/** + * Writes a base 16 integer to the screen. + * @param h the integer to print + */ void lcd_puth(int h); + +/** + * Writes a byte in binary to the screen. + * @param b the byte to print + */ void lcd_putb(uint8_t b); -void lcd_clear(void); /** - * Buffered/async access + * Clears the LCD. */ -void lcd_handler(void); -void lcd_put(const char *s); +void lcd_clear(void); #endif // LCD_H_ |