AnsweredAssumed Answered

stm32 + ILI9325 question

Question asked by herring.trent on Sep 26, 2011
Latest reply on Oct 1, 2011 by herring.trent
im trying to interface a ILI9325 and im not 100% understanding how the write function works.
the function was ripped from a driver file for the ILI9325 and the ports PC are used to control the control lines.

why is data shifted and sent twice on two different ports? wouldnt it make more since to send 16bit data at once?

void ili9320_WriteData(u16 data)
       u16 temp;
     temp = GPIO_ReadOutputData(GPIOB);
     GPIO_Write(GPIOB, (data<<8)|(temp&0x00ff));
     temp = GPIO_ReadOutputData(GPIOC);
     GPIO_Write(GPIOC, (data>>8)|(temp&0xff00));