关于 红牛板 ili9320LCD 的问题
时间:10-02
整理:3721RD
点击:
- typedef struct
- {
- vu16 LCD_REG;
- vu16 LCD_RAM;
- } LCD_TypeDef;
- /* LCD is connected to the FSMC_Bank1_NOR/SRAM4 and NE4 is used as ship select signal */
- #define LCD_BASE ((u32)(0x60000000 | 0x0C000000 ))
- #define LCD ((LCD_TypeDef *) LCD_BASE) /<font color="red"><font color="#ff0000">/这里让LCD指向了0x6C000000也就是LCD_REG</font></font>
- <font color="red">
- </font>
- <font color="#ff0000"><font color="#ff0000">但是后面 就有这样的调用</font>:</font>
- u16 LCD_ReadReg(u8 LCD_Reg)
- {
- u16 temp;
- /* Write 16-bit Index (then Read Reg) */
- LCD->LCD_REG = LCD_Reg;//<font color="red"><font color="#ff0000">问:改变了LCD_REG 的值 这个值就传到了LCD上了吗?怎么传过去的?</font></font>
- temp = LCD->LCD_RAM;//<font color="#ff0000"><font color="#ff0000">问:改变了LCD_RAM 就是寄存器的值 这个值什么时候更新的?</font></font>
- temp = LCD->LCD_RAM;
- return temp;
- }
- 还比如:
- u16 LCD_ReadRAM(void)
- {
- vu16 dummy;
- /* Write 16-bit Index (then Read Reg) */
- LCD->LCD_REG = R34; /* Select GRAM Reg */
- /* Read 16-bit Reg */
- dummy = LCD->LCD_RAM;
- return dummy;
-
- }