DMA2D->OOR &= ~(uint32_t)DMA2D_OOR_LO; DMA2D->OOR |= (DMA2D_InitStruct->DMA2D_OutputOffset); 寄存器定义: 再看代码那几句: if(Direction == LCD_DIR_HORIZONTAL) { DMA2D_InitStruct.DMA2D_OutputOffset = 0; DMA2D_InitStruct.DMA2D_NumberOfLine = 1; DMA2D_InitStruct.DMA2D_PixelPerLine = ...
DMA2D_R2M:寄存器到存储 复制 hdma2d.Instance = DMA2D;hdma2d.Init.Mode = DMA2D_R2M;hdma2d.Init...
这几个成员用于配置DMA2D的寄存器颜色值,若DMA2D工作在“寄存器到存储器”(DMA2D_R2M)模式时,这个颜色值作为数据源,被DMA2D复制到显存空间,即目标空间都会被填入这一种色彩。 (4) DMA2D_OutputMemoryAdd 本成员用于配置DMA2D的输出FIFO的地址, DMA2D的数据会被搬运到该空间,一般把它设置为本次传输显示位置的起始地址...
hdma2d.Init.Mode = DMA2D_R2M;hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB4444;hdma2d.Init.Output...
DMA2D_InitTypeDef DMA2D_InitStruct; DMA2D_InitStruct.DMA2D_Mode = DMA2D_R2M;//寄存器到显存模式DMA2D_InitStruct.DMA2D_CMode = DMA2D_ARGB8888; DMA2D_InitStruct.DMA2D_OutputBlue = (BSP_Line_Color>>0)&0x000000FF; DMA2D_InitStruct.DMA2D_OutputGreen = (BSP_Line_Color>>8)&0x000000FF; ...
dma2d_transfer_data_r2m((uint32_t *)LCD_FRAME_BUFFER, LCD_WIDTH, LCD_HEIGHT, 0, color); #else uint16_t *ptr = (uint16_t*)LCD_FRAME_BUFFER; uint32_t i = 0; while (i++ < LCD_WIDTH*LCD_HEIGHT) { *(ptr+i) = color; ...
if(hdma2d->Init.Mode != DMA2D_R2M) { assert_param(IS_DMA2D_INPUT_COLOR_MODE(pLayerCfg->InputColorMode)); if(hdma2d->Init.Mode != DMA2D_M2M) { assert_param(IS_DMA2D_ALPHA_MODE(pLayerCfg->AlphaMode)); } } /* 上锁 */ __HAL_LOCK(hdma2d); /* 设置DMA2D外设状态 */ hdma2d->...
staticvoiddma2d_transfer_data_r2m(uint32_t*addr,uint32_t xSize,uint32_t ySize,uint32_t offsetLine,uint16_t color){DMA2D->CR=DMA2D_R2M;// dma2d mode: register to memory.DMA2D->OPFCCR=DMA2D_OUTPUT_RGB565;DMA2D->OCOLR=color;DMA2D->OMAR=(uint32_t)addr;DMA2D->OOR=offsetLine;DMA2D->...
init.mode = DMA2D_R2M; Mode Register to Memory dma2d_config.init.color_mode = DMA2D_OUTPUT_RGB565; DMA2D Output color mode is ARGB4444 (16 bpp) dma2d_config.init.output_offset = 0; No offset in output dma2d_config.init.red_blue_swap = DMA2D_RB_REGULAR; No R&B swap for the output...
#define DMA2D_M2M ((uint32_t)0x00000000U) /*存储器到存储传输模式 */ #define DMA2D_M2M_PFC DMA2D_CR_MODE_0 /*存储器到存储器传输模式,并执行FPC像素格式转 */ #define DMA2D_M2M_BLEND DMA2D_CR_MODE_1 /* 存储器到存储器模式,并执行像素格式转换和混合 */ #define DMA2D_R2M DMA2D_CR_MODE...