[C] 纯文本查看 复制代码 static void _DMA_MixColorsBulk(LCD_COLOR * pColorFG, LCD_COLOR * pColorBG, LCD_COLOR * pColorDst, U8 Intens, U32 NumItems) {
//
// Set up mode
//
DMA2D->CR = 0x00020000UL | (1 << 9); // Control Register (Memory to memory with blending of FG and BG and TCIE)
//
// Set up pointers
//
DMA2D->FGMAR = (U32)pColorFG; // Foreground Memory Address Register
DMA2D->BGMAR = (U32)pColorBG; // Background Memory Address Register
DMA2D->OMAR = (U32)pColorDst; // Output Memory Address Register (Destination address)
//
// Set up pixel format
//
DMA2D->FGPFCCR = LTDC_Pixelformat_ARGB8888
| (1UL << 16)
| ((U32)Intens << 24);
DMA2D->BGPFCCR = LTDC_Pixelformat_ARGB8888
| (0UL << 16)
| ((U32)(255 - Intens) << 24);
DMA2D->OPFCCR = LTDC_Pixelformat_ARGB8888;
//
// Set up size
//
DMA2D->NLR = (U32)(NumItems << 16) | 1; // Number of Line Register (Size configuration of area to be transfered)
//
// Execute operation
//
DMA2D->CR |= 1;
while (DMA2D->CR & DMA2D_CR_START) {
//__WFI(); // Sleep until next interrupt
}
}
二代示波器项目中,设置像素格式的时候为啥都是ARGB8888格式(LTDC_Pixelformat_ARGB8888),好像整个项目选择的是LTDC选择的是RGB565,emwin库是BGR565格式?
|