




这段显示图片的程序看不明白,能帮忙看看分析一下吗?
void LCD_WriteBMP(uint32_t BmpAddress)
{uint32_t index = 0, size = 0;
/* Read bitmap size */
size = *(__IO uint16_t *) (BmpAddress + 2);
size |= (*(__IO uint16_t *) (BmpAddress + 4)) << 16;
/* Get bitmap data address offset */
index = *(__IO uint16_t *) (BmpAddress + 10);
index |= (*(__IO uint16_t *) (BmpAddress + 12)) << 16;
size = (size - index)/2;
BmpAddress += index;
/* Set GRAM write direction and BGR = 1 */
/* I/D=00 (Horizontal : decrement, Vertical : decrement) */
/* AM=1 (address is updated in vertical writing direction) */
LCD_WriteReg(LCD_REG_3, 0x1008);
LCD_WriteRAM_Prepare();
for(index = 0; index < size; index++)
{
LCD_WriteRAM(*(__IO uint16_t *)BmpAddress);
BmpAddress += 2;
}
/* Set GRAM write direction and BGR = 1 */
/* I/D = 01 (Horizontal : increment, Vertical : decrement) */
/* AM = 1 (address is updated in vertical writing direction) */
LCD_WriteReg(LCD_REG_3, 0x1018);
}
回复
打赏帖 | |
---|---|
分享博世的两种不同的喷射系统模式被打赏5分 | |
汽车+开路实验与短路实验被打赏10分 | |
多点式电子控制汽油喷射系统知识分享被打赏10分 | |
分享机械控制式汽油喷射系统被打赏5分 | |
汽车显示屏——第2部分:TFTLCD、OLED和micro-LED显示屏电源技术被打赏50分 | |
汽车+汽车电路板的走线规则被打赏20分 | |
五一劳动节快乐被打赏5分 | |
【分享开发笔记,赚取电动螺丝刀】s32k146适配zephyr(六)使用Ozone调试镜像被打赏29分 | |
【分享开发笔记,赚取电动螺丝刀】s32k146适配zephyr(五)添加设备树节点被打赏33分 | |
【分享开发笔记,赚取电动螺丝刀】s32k146适配zephyr(四)使用I2C总线驱动RA8900CE芯片被打赏23分 |