📄 sublcd.h
字号:
#ifndef SUBLCD_H
#define SUBLCD_H
#include "ssd192X.h"
#include "io.h"
void __inline__ SubCmdWriteByte(UINT16 value)
{
UINT8 bReg;
SSD_REGWB(REG_Sub_RS,0x00); // Enable command
do{
bReg = SSD_REGRB(REG_Sub_Ready);
}while ((bReg & 0x01)); //Wait for ssd192X idle
SSD_REGWB(REG_Sub_Data_0,value);
SSD_REGWB(REG_Sub_Data_1,value); // Dummy byte
}
void __inline__ SubArgWriteByte(UINT16 value)
{
UINT8 bReg;
SSD_REGWB(REG_Sub_RS,0x01); // Enable argument
do
bReg = SSD_REGRB(REG_Sub_Ready);
while ((bReg & 0x01)); //Wait for ssd192X idle
SSD_REGWB(REG_Sub_Data_0,value);
SSD_REGWB(REG_Sub_Data_1,value); // Dummy byte
}
void __inline__ SubDataWriteWord(UINT16 value)
{
UINT8 bReg;
SSD_REGWB(REG_Sub_RS,0x81); // Enable data
do
{ bReg = SSD_REGRB(REG_Sub_Ready);}
while ((bReg & 0x01)); //Wait for ssd192X idle
SSD_REGWW(REG_Sub_Data_0,value);
}
void __inline__ SubDatWriteWord(UINT16 value)
{
UINT8 bReg;
SSD_REGWB(REG_Sub_RS,0x81); // Enable data
do
{ bReg = SSD_REGRB(REG_Sub_Ready);}
while ((bReg & 0x01)); //Wait for ssd192X idle
SSD_REGWW(REG_Sub_Data_0,value);
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -