2019-03-20 05:34:51 +01:00
|
|
|
#ifndef LCD_H
|
|
|
|
#define LCD_H
|
|
|
|
|
2019-04-04 06:33:42 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2019-03-20 05:34:51 +01:00
|
|
|
|
2019-05-02 09:27:01 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include "utils.h"
|
|
|
|
|
2019-03-22 02:01:53 +01:00
|
|
|
#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);
|
2019-05-02 09:27:01 +02:00
|
|
|
void LCD_GoTo(uint8_t row, uint8_t col);
|
2019-03-20 05:34:51 +01:00
|
|
|
|
2019-05-02 09:27:01 +02:00
|
|
|
void LCD_OutString(__xdata const char* string, uint8_t max_chars);
|
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
|
|
|
|
2019-04-04 06:33:42 +02: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
|
|
|
|
|