aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-07-10 14:50:12 +0200
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-07-10 14:50:12 +0200
commit5a1f527fcfa9e6bd69517be78481dc7688cb6522 (patch)
tree6722cb672129058baf599e43139f4491ef8cc9a1 /boards
parent6af2d41ea39474900b74e9fad5d2fbad5a6c302f (diff)
downloaduGFX-5a1f527fcfa9e6bd69517be78481dc7688cb6522.tar.gz
uGFX-5a1f527fcfa9e6bd69517be78481dc7688cb6522.tar.bz2
uGFX-5a1f527fcfa9e6bd69517be78481dc7688cb6522.zip
working on the LTDC driver (not done yet and also hacky code)
Diffstat (limited to 'boards')
-rw-r--r--boards/base/STM32F746-Discovery/board_STM32LTDC.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/boards/base/STM32F746-Discovery/board_STM32LTDC.h b/boards/base/STM32F746-Discovery/board_STM32LTDC.h
index 33f6e2cb..53940ad2 100644
--- a/boards/base/STM32F746-Discovery/board_STM32LTDC.h
+++ b/boards/base/STM32F746-Discovery/board_STM32LTDC.h
@@ -12,6 +12,8 @@
#include "stm32f746g_discovery_sdram.h"
#include <string.h>
+#include "RGB565_480x272.h"
+
static const ltdcConfig driverCfg = {
480, 270, // Width, Height (pixels)
41, 10, // Horizontal, Vertical sync (pixels)
@@ -21,7 +23,7 @@ static const ltdcConfig driverCfg = {
0x000000, // Clear color (RGB888)
{ // Background layer config
- (LLDCOLOR_TYPE *)SDRAM_BANK_ADDR, // Frame buffer address
+ (LLDCOLOR_TYPE *)RGB565_480x272, // Frame buffer address
480, 270, // Width, Height (pixels)
480 * LTDC_PIXELBYTES, // Line pitch (bytes)
LTDC_PIXELFORMAT, // Pixel format
@@ -60,14 +62,14 @@ static inline void init_board(GDisplay *g) {
/* PLLSAI activation.*/
RCC->PLLSAICFGR = (STM32_PLLSAIN_VALUE << 6) | (STM32_PLLSAIR_VALUE << 28) | (STM32_PLLSAIQ_VALUE << 24);
- RCC->DCKCFGR = (RCC->DCKCFGR & ~RCC_DCKCFGR_PLLSAIDIVR) | STM32_PLLSAIR_POST;
+ RCC->DCKCFGR1 = (RCC->DCKCFGR1 & ~RCC_DCKCFGR1_PLLSAIDIVR) | STM32_PLLSAIR_POST;
RCC->CR |= RCC_CR_PLLSAION;
// Initialise the SDRAM
SDRAM_Init();
// Clear the SDRAM
- memset((void *)SDRAM_BANK_ADDR, 0, 0x400000);
+ //memset((void *)SDRAM_BANK_ADDR, 0, 0x400000);
break;
}