sublcd.h

来自「ssd192X_LPC2210_V2.0 LPC2210的16位数据口控制SS」· C头文件 代码 · 共 66 行

H
66
字号
#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 + =
减小字号Ctrl + -
显示快捷键?