123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /*
- * hd44780_i2c_lcd.h
- *
- * Copyright 2022 dh33ex <dh33ex@riseup.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA or see <http://www.gnu.org/licenses/>.
- *
- *
- */
- #ifndef HD44780_I2C_LCD_H
- #define HD44780_I2C_LCD_H
- #define HD44780_NO_CURSOR 0
- #define HD44780_BLINK_CURSOR 1
- #define HD44780_PERMANENT_CURSOR 2
- struct hd44780 {
- unsigned char light;
- unsigned char cursor;
- unsigned char address;
- unsigned char rows;
- unsigned char columns;
- };
- typedef struct hd44780 HD44780;
- void LCD_init(HD44780 *disp);
- void LCD_write(HD44780 *disp, char *string);
- void LCD_set_address(HD44780 *disp, unsigned char x, unsigned char y);
- void LCD_backlight(HD44780 *disp, unsigned char state);
- void LCD_clear(HD44780 *disp);
- #endif
|