📄 lcd.h
字号:
#ifndef _LCD_H_
#define _LCD_H_
#include "71x_map.h"
#include <string.h>
#define PORT0_2 2
#define PORT0_12 12
//#define LCD_RESET (0x0001 << PORT0_2)
#define LCD_RESET (0x0001 << PORT0_12)
#define LCD_RESET_HIGH (GPIO0->PD |= LCD_RESET)
#define LCD_RESET_LOW (GPIO0->PD &= ~(LCD_RESET))
#define LCD_MIN_COLUMN (0)
#define LCD_MAX_COLUMN (127)
#define LCD_MIN_ROW (0)
#define LCD_MAX_ROW (63)
// API
void LCD_cmd_write(u8 Lcmd);
void LCD_data_write(u8 Ldata);
u8 LCD_cmd_read(void);
void lcd_init(void);
void lcd_write(u8 command, u8 data);
u8 lcd_read(u8 command);
void lcd_configure(u8 contrast, u8 brightness);
void lcd_erase(void);
void lcd_test(u8 pattern);
void lcd_all_clear(void);
void lcd_area_clear(u8 left, u8 top, u8 right, u8 bottom);
void lcd_area_invert(u8 left, u8 top, u8 right, u8 bottom);
void lcd_area_fill(u8 left, u8 top, u8 right, u8 bottom);
void lcd_hline_draw(u8 left, u8 right, u8 row);
void lcd_vline_draw(u8 top, u8 bottom, u8 column);
void lcd_hline_clear(u8 left, u8 right, u8 row);
void lcd_vline_clear(u8 top, u8 bottom, u8 column);
void lcd_box_draw(u8 left, u8 top, u8 right, u8 bottom);
void lcd_box_clear(u8 left, u8 top, u8 right, u8 bottom);
void lcd_update(u8 top, u8 bottom);
u8 lcd_put_char(u8 left, u8 top, u8 cChar);
u8 lcd_put_string(u8 left, u8 top, u8 *string);
u8 lcd_put_atmel_logo(u8 left, u8 top);
void screen_version(void);
void screen_status(u8 *str1, u8* str2);
void screen_connection(u8 *str1);
void screen_volume(u16 val);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -