MS-DTU/Anjiehui7_Set_ZNY/User/Lcd_drv.h

49 lines
1.2 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef USER_LCD_DRV_PRESENT
#define USER_LCD_DRV_PRESENT
#include "type.h"
void LCD_Init();
void LCD_MyOpen();
// 任务主体
void Lcd_Task(void *p_arg);
#pragma pack(push, 1)
// 显示缓冲区
typedef struct
{
u8 buf[25]; // 每个字节存6个点对应6根COM线
// 一些特殊显示的标志位,比如闪烁显示
// 这部分数据不在缓冲区内容里面,只是作为标记使用
// 但是要用于比较,以决定是否需要更新
unsigned fld1_blink : 1; // 显示1是否闪烁
unsigned fld2_blink : 1; // 显示2是否闪烁
unsigned fld3_blink : 1; // 显示3是否闪烁
unsigned fld4_blink : 1; // 显示4是否闪烁
unsigned battery_blink : 1; // 电池是否闪烁
unsigned blink_visible: 1; // 闪烁状态:亮还是熄
unsigned : 2;
unsigned cursor_pos : 4; // 光标位置
unsigned cursor_width : 4; // 光标长度
} TVideoBuf;
#pragma pack(pop)
extern TVideoBuf VideoBuf;
void HT1621_WriteBuf(u16 pin_com, u8 bit_val);
void HT1621_Refresh();
void HT1621_AllOff();
void HT1621_AllOn();
// 写一个七段码字符
void HT1621_WriteChar(char c, u16 pin_comA, u16 pin_comB, u16 pin_comC, u16 pin_comD, u16 pin_comE, u16 pin_comF, u16 pin_comG);
// 写一个七段码数据
void HT1621_Write7Seg(u8 val, u16 pin_comA, u16 pin_comB, u16 pin_comC, u16 pin_comD, u16 pin_comE, u16 pin_comF, u16 pin_comG);
#endif