这段显示图片的程序看不明白,能帮忙看看分析一下吗?
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);
}
回复
我要赚赏金打赏帖 |
|
|---|---|
| 告别手动建模:我让AI用FreeCAD画了个开发板外壳被打赏¥30元 | |
| 【瑞萨RA8D1测评】总结收官——从IMU动作识别到LVGL桌宠被打赏¥33元 | |
| 【瑞萨BLE/WIFI模块测评】MPU6050双链路对比被打赏¥30元 | |
| 【瑞萨BLE/WIFI模块测评】DA14531被打赏¥28元 | |
| 【瑞萨BLE/WI-FI模块测评】DA16200被打赏¥28元 | |
| 【瑞萨BLE/WIFI模块测评】环境搭建被打赏¥32元 | |
| 【瑞萨RA8D1测评】LVGL显示动画被打赏¥30元 | |
| 【瑞萨RA8D1测评】IMU动作识别的数据采集与模型训练被打赏¥33元 | |
| 【S32K3学习整理】时钟系统 ClockOut 功能被打赏¥28元 | |
| 【S32K3学习整理】以太网LoopBack模式功能验证被打赏¥26元 | |
我要赚赏金
