@@ -48,9 +48,9 @@ static void MDT_GRAPHICS_DMA2D_ClearBitmap(MDT_BITMAP* bmp, uint8_t color) {
4848 LL_DMA2D_InitTypeDef DMA2D_InitStruct = {
4949 .Mode = LL_DMA2D_MODE_R2M ,
5050 .ColorMode = LL_DMA2D_OUTPUT_MODE_ARGB8888 ,
51- .OutputGreen = color ,//Green_Value;
52- .OutputBlue = color ,// Blue_Value;
53- .OutputRed = color ,// Red_Value;
51+ .OutputGreen = color ,
52+ .OutputBlue = color ,
53+ .OutputRed = color ,
5454 .OutputAlpha = color ,
5555 .OutputMemoryAddress = (uint32_t ) (bmp -> buff ),
5656 .LineOffset = 0 ,
@@ -157,13 +157,15 @@ void MDT_WaitForVSync() {
157157}
158158
159159
160- #define DMA_STREAM LL_DMA_STREAM_2
161- #define DMA_CHANNEL LL_DMA_CHANNEL_1
162-
163160/**
161+ *
164162 * NOTE: This approach is NOT working because only DMA2 is capable of making
165163 * M2M transfers, but DMA2 is being used for the VGA controller.
166- */
164+ *
165+
166+ #define DMA_STREAM LL_DMA_STREAM_2
167+ #define DMA_CHANNEL LL_DMA_CHANNEL_1
168+
167169static void MDT_GRAPHICS_HW_ClearBitmap(MDT_BITMAP* bmp, uint8_t color) {
168170
169171 LL_DMA_DeInit(DMA1, DMA_STREAM);
@@ -198,11 +200,6 @@ static void MDT_GRAPHICS_HW_ClearBitmap(MDT_BITMAP* bmp, uint8_t color) {
198200
199201}
200202
201-
202- /**
203- * NOTE: This approach is NOT working because only DMA2 is capable of making
204- * M2M transfers, but DMA2 is being used for the VGA controller.
205- */
206203static void MDT_GRAPHICS_HW_DrawBitmap(MDT_BITMAP* bmpdst, MDT_BITMAP* bmpsrc, int x, int y) {
207204
208205 LL_DMA_InitTypeDef DMA_InitStruct = {
@@ -232,6 +229,8 @@ static void MDT_GRAPHICS_HW_DrawBitmap(MDT_BITMAP* bmpdst, MDT_BITMAP* bmpsrc, i
232229
233230}
234231
232+ */
233+
235234
236235void MDT_GRAPHICS_GetBitmapFromContext (MDT_BITMAP * bmp , MDT_DRAWING_CONTEXT * ctx ) {
237236
0 commit comments