📄 ledx7.h
字号:
#ifndef _SHORT
#define _SHORT
#define uchar unsigned char
#define uint unsigned int
#endif //endif _SHORT
#define Latch_addr_H P5OUT|=0x10
#define Latch_addr_L P5OUT&=0xef
#define Latch_data_H P5OUT|=0x20
#define Latch_data_L P5OUT&=0xdf
#ifndef _DELAY
#define _DELAY
void Delay(uint tc)
{
while(tc--);
}
#endif //endif _DELAY
class Ledx7
{
public:
Ledx7();
void Display(uchar pos,uchar value);
// void Display(uint value);
void Display(float value);
void Test();
void Clear();
uint GetDlTime() { return DlTime; };
void Setvalue(float Ntemp);
void SetPnPos(uchar NewPos);
bool GetHL(){return HiLeft;};
void SetHL(bool NewB);
private:
uchar Number[13];
uchar value[4];
uint DlTime;
uchar PnPos;
bool HiLeft;
bool KasUnit;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -