这段显示图片的程序看不明白,能帮忙看看分析一下吗?
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);
}
回复
我要赚赏金打赏帖 |
|
|---|---|
| 在K230DBOX上实现多时段语音提示功能被打赏¥14元 | |
| 使K230DBOX实现相机持续拍照功能被打赏¥12元 | |
| 基于K230DBOX的文本管理器设计被打赏¥14元 | |
| 基于K230DBOX的彩色画板功能实现被打赏¥15元 | |
| 在K230DBOX上实现音乐播放器功能被打赏¥15元 | |
| NXP MCU系列开发板MCULink固件升级方法【VSCode】被打赏¥28元 | |
| 三分钟快速搭建NXP MCU开发环境(VSCode)被打赏¥22元 | |
| 为遥控小车巧添功能被打赏¥26元 | |
| 【S32K3XX】FlexCAN 模块配置使用被打赏¥30元 | |
| 【S32K3XX】FlexCAN RAM 资源分配整理被打赏¥25元 | |
我要赚赏金
