unsigned short int LCD_readReg(uint16 Index_In)
{
// 读取的数据确实只有status colorsInPixels // By 0822
// reading the display data from GDDRAM or reading the status from the status register
PTD_BASE_PTR->PDDR |= 0x0000FFFFu; // 后十六位置为输出
LCD_writeIndex(Index_In); //写入要读的寄存器号
CS(1);DC(1);CS(0);WR(1);RD(0);
vint32 Index = PTD_BASE_PTR->PDOR;
Index &= ~0x0000FFFFu;
Index |= 0xFFFFu;
PTD_BASE_PTR->PDOR = Index;
PTD_BASE_PTR->PDDR &= ~0x0000FFFFu; // 后十六位置为输入
RD(1);
Index = PTD_BASE_PTR->PDIR & 0x0000FFFFu;
CS(1);
return Index;
}