1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Fix #1798: Use AHB3 enable register for STM32H7 (#1840)

This commit is contained in:
robekras 2020-10-07 20:17:38 +02:00 committed by GitHub
parent 6c426aa855
commit 9ec4b61417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,13 @@ static void dma2d_wait(void);
void lv_gpu_stm32_dma2d_init(void)
{
/* Enable DMA2D clock */
#if defined(STM32F4) || defined(STM32F7)
RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN;
#elif defined(STM32H7)
RCC->AHB3ENR |= RCC_AHB3ENR_DMA2DEN;
#else
# warning "LVGL can't enable the clock of DMA2D"
#endif
/* Delay after setting peripheral clock */
volatile uint32_t temp = RCC->AHB1ENR;