stc_rpncalc/src/lcd.h

57 lines
1.5 KiB
C
Raw Normal View History

// 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, see <https://www.gnu.org/licenses/>.
2019-03-20 05:34:51 +01:00
#ifndef LCD_H
#define LCD_H
#ifdef __cplusplus
extern "C" {
#endif
2019-03-20 05:34:51 +01:00
#include <stdint.h>
#include "utils.h"
#define MAX_CHARS_PER_LINE 16
2019-03-20 05:34:51 +01:00
#define MAX_ROWS 2
void LCD_Open(void);
void LCD_Clear(void);
void LCD_GoTo(uint8_t row, uint8_t col);
2019-03-20 05:34:51 +01:00
void LCD_OutString(__xdata const char* string, uint8_t max_chars);
2019-10-07 09:19:26 +02:00
#ifdef DESKTOP
void LCD_OutString_Initial(__xdata const char* string, uint8_t max_chars);
#else
#define LCD_OutString_Initial(a, b) LCD_OutString(a, b)
#endif
2019-03-20 05:34:51 +01:00
short TERMIO_PutChar(unsigned char letter);
2019-03-20 08:21:11 +01:00
void LCD_OutNibble(uint8_t x);
2019-04-01 01:20:28 +02:00
void LCD_ClearToEnd(uint8_t curr_row);
2019-03-20 05:34:51 +01:00
2019-04-01 08:38:17 +02:00
//CGRAM character address
#define CGRAM_EXP 0
#define CGRAM_EXP_NEG 1
2019-03-20 05:34:51 +01:00
#include "utils.h"
#ifdef DESKTOP
const char* get_lcd_buf(void);
void print_lcd(void);
#endif
#ifdef __cplusplus
}
#endif
2019-03-20 05:34:51 +01:00
#endif