// calculate the position offset in framebuffer. pos = x + y*LCD_WIDTH; ptr = (uint16_t*)LCD_FRAME_BUFFER; // modify the framebuffer. #if USE_DMA2D_EN dma2d_transfer_data_r2m((uint32_t *)(ptr+pos), 1, 1, 0, color); #else *(ptr+pos) = color; #endif /* USE_DMA2D_EN...
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->NLR=(uint32_t)(xSize<<16)|(uint16_t)ySize;DMA2D->CR|=DMA2D_CR_START;while(...
Alpha mode configuration isn't 10 Replaced by original value multiplied by the value in DMA2D_xxPFCCR / 255 what we need here? Yes, this or the other way I can create ARGB8888 image map programmatically, but we are talking about hardware acceleration in the context of this, aforementioned ...
else是画的竖线,所以每行只画一个点,画length条线,所以每行只画一个点,offset的值就是:LCD_PIXEL_WIDTH - 1 发现不同MODE有很多不同理解故深化一下看看初始化函数内部操作的哪些寄存器进一步理解 DMA2D_Init DMA2D_InitStruct.DMA2D_Mode = DMA2D_R2M; // DMA2D->CR DMA2D_InitStruct.DMA2D_CMode = DMA2D...
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->NLR = (uint32_t)(xSize << 16) | (uint16_t)ySize; ...
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->NLR = (uint32_t)(xSize << 16) | (uint16_t)ySize; ...