📄 display_led.h
字号:
/*
********************************************************************************************************************
*描述: DP-51中LED显示程序头文件
*文件名: DISPLAY_LED.H
*应用语言: KEIL C51
*应用系统: RTX51 FULL 5.10
*版本 : V1.0
*作者: 刘养海
*广州周立功单片机发展有限公司 保留所有的版权
********************************************************************************************************************
*/
#ifndef _DISPLAY_LED_H
#define _DISPLAY_LED_H
/*
********************************************************************************************************************
*引用限制说明
********************************************************************************************************************
*/
#ifndef _GLOBAL_DISPLAY_LED_
#define GLOBAL_DISPLAY_LED extern
#else
#define GLOBAL_DISPLAY_LED
#endif
/*
********************************************************************************************************************
*DISPLAY_LED中常量定义
********************************************************************************************************************
*/
#ifndef _GLOBAL_DISPLAY_LED_
GLOBAL_DISPLAY_LED code LedSegCode[];
#else
GLOBAL_DISPLAY_LED code LedSegCode[]={ 0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8, //0X00--0X07
0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e, //0X08--0X0f
0xc8,0x8c,0xbf //n, p, -
};
#endif
/*
********************************************************************************************************************
*DISPLAY_LED中应用数据结构说明
********************************************************************************************************************
*/
typedef struct _display_led_struct{
unsigned char LedGlintAtbBit0 :1; //位0闪烁属性
unsigned char LedGlintAtbBit1 :1; //位1闪烁属性
unsigned char LedGlintAtbBit2 :1; //位2闪烁属性
unsigned char LedGlintAtbBit3 :1; //位3闪烁属性
unsigned char LedGlintAtbBit4 :1; //位4闪烁属性
unsigned char LedImmergeAtbBit0 :1; //位0消隐属性
unsigned char LedImmergeAtbBit1 :1; //位1消隐属性
unsigned char LedImmergeAtbBit2 :1; //位2消隐属性
unsigned char LedImmergeAtbBit3 :1; //位3消隐属性
unsigned char LedImmergeAtbBit4 :1; //位4消隐属性
unsigned char DisplayBuf[5]; //显示缓冲区
unsigned char DisplayPoint; //显示指针
}structDisplayLed,*P_structDisplayLed;
GLOBAL_DISPLAY_LED structDisplayLed idata structDisplayLedApp;
GLOBAL_DISPLAY_LED P_structDisplayLed idata P_structDisplayLedApp;
/*
********************************************************************************************************************
*DISPLAY_LED中应用函数说明
********************************************************************************************************************
*/
/*
********************************************************************************************************************
函数原型: void Show_LED(void)
参数说明: 无
返回值: 无
说明: 该函数用于LED显示处理
********************************************************************************************************************
*/
GLOBAL_DISPLAY_LED void Show_LED(void);
/*
********************************************************************************************************************
*display_led定义结束
********************************************************************************************************************
*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -