aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-07-24 14:02:15 +0200
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-07-24 14:02:15 +0200
commit83b29284aa56691f4dc158defa57c58035eec814 (patch)
treebe5d7192f255ed18bda6817c0fc738d18a90e7dc /drivers
parent9a292562e6ea2ec70e92afb504b55de2d3fdafae (diff)
parentc72c20179ee36634bd7267c12ee73e4ba6d57909 (diff)
downloaduGFX-83b29284aa56691f4dc158defa57c58035eec814.tar.gz
uGFX-83b29284aa56691f4dc158defa57c58035eec814.tar.bz2
uGFX-83b29284aa56691f4dc158defa57c58035eec814.zip
Merge branch 'master' into Alternate_Raw32_Scheduler
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c b/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
index eafdc40f..9c2de092 100644
--- a/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
+++ b/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
@@ -156,14 +156,20 @@ static void _ltdc_init(void)
// Set up the display scanning
uint32_t hacc, vacc;
- // Reset the LTDC hardware module
+ // Reset the LTDC peripheral
RCC->APB2RSTR |= RCC_APB2RSTR_LTDCRST;
RCC->APB2RSTR = 0;
// Enable the LTDC clock
- RCC->DCKCFGR1 = (RCC->DCKCFGR1 & ~RCC_DCKCFGR1_PLLSAIDIVR) | (1 << 16); /* /4 */
+ #if defined(STM32F4)
+ RCC->DCKCFGR = (RCC->DCKCFGR & ~RCC_DCKCFGR_PLLSAIDIVR) | (1 << 16);
+ #elif defined(STM32F7)
+ RCC->DCKCFGR1 = (RCC->DCKCFGR1 & ~RCC_DCKCFGR1_PLLSAIDIVR) | (1 << 16);
+ #else
+ #error STM32LTDC driver not implemented for your platform
+ #endif
- // Enable the module
+ // Enable the peripheral
RCC->APB2ENR |= RCC_APB2ENR_LTDCEN;
// Turn off the controller and its interrupts