1234567891011121314151617181920212223242526272829303132333435 |
- void SPI2_SendByte(uint8_t sendData)
- {
- while (SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_TXE) == RESET);
- SPI_I2S_SendData(SPI2, sendData);
- }
- void ili9341c_SetWindow(uint16_t ystart, uint16_t xstart, uint16_t yend, uint16_t xend)
- {
- . . .
- GPIO_ResetBits(GPIOB, GPIO_Pin_12);
- SPI2_SendByte(LCD_PAGE_ADDR);
-
- while (SPI_I2S_GetFlagStatus(SPI2,SPI_FLAG_BSY)!=RESET);
- GPIO_SetBits(GPIOB, GPIO_Pin_12);
- SPI2_SendByte(xstart>>8);
- SPI2_SendByte(xstart&0xFF);
- SPI2_SendByte(xend>>8);
- SPI2_SendByte(xend&0xFF);
-
- while (SPI_I2S_GetFlagStatus(SPI2,SPI_FLAG_BSY)!=RESET);
- . . .
- }
|