aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-11-29 00:05:24 +0100
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-11-29 00:05:24 +0100
commitaf2c663f57b13b8cb8221c985b0e3cf19716abcb (patch)
treee2814a4cb5951afae44c080b5335db48feb9a37c /boards
parent02e793e5db3ea240432d43c3f9ab098516df1173 (diff)
downloaduGFX-af2c663f57b13b8cb8221c985b0e3cf19716abcb.tar.gz
uGFX-af2c663f57b13b8cb8221c985b0e3cf19716abcb.tar.bz2
uGFX-af2c663f57b13b8cb8221c985b0e3cf19716abcb.zip
Adding Altera MAX10 NEEK board files
Diffstat (limited to 'boards')
-rw-r--r--boards/base/Altera-MAX10-Neek/board.mk6
-rw-r--r--boards/base/Altera-MAX10-Neek/board_framebuffer.h62
-rw-r--r--boards/base/Altera-MAX10-Neek/readme.txt9
3 files changed, 77 insertions, 0 deletions
diff --git a/boards/base/Altera-MAX10-Neek/board.mk b/boards/base/Altera-MAX10-Neek/board.mk
new file mode 100644
index 00000000..bc0d4652
--- /dev/null
+++ b/boards/base/Altera-MAX10-Neek/board.mk
@@ -0,0 +1,6 @@
+GFXINC += $(GFXLIB)/boards/base/Altera-MAX10-NEEK
+GFXSRC +=
+GFXDEFS +=
+GFXLIBS +=
+
+include $(GFXLIB)/drivers/gdisp/framebuffer/driver.mk
diff --git a/boards/base/Altera-MAX10-Neek/board_framebuffer.h b/boards/base/Altera-MAX10-Neek/board_framebuffer.h
new file mode 100644
index 00000000..4943b187
--- /dev/null
+++ b/boards/base/Altera-MAX10-Neek/board_framebuffer.h
@@ -0,0 +1,62 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://ugfx.org/license.html
+ */
+#include <system.h>
+#include <io.h>
+
+#define SCREEN_WIDTH 800
+#define SCREEN_HEIGHT 480
+#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888
+
+#ifdef GDISP_DRIVER_VMT
+
+ static void board_init(GDisplay* g, fbInfo* fbi)
+ {
+ g->g.Width = SCREEN_WIDTH;
+ g->g.Height = SCREEN_HEIGHT;
+ g->g.Backlight = 100;
+ g->g.Contrast = 50;
+ fbi->linelen = g->g.Width * sizeof(LLDCOLOR_TYPE); // bytes per row
+ fbi->pixels = gfxAlloc(SCREEN_WIDTH * SCREEN_HEIGHT * sizeof(LLDCOLOR_TYPE)); // pointer to the memory frame buffer
+ if (!fbi->pixels) {
+ gfxHalt("Couldn't allocate memory for framebuffer\r\n");
+ }
+
+ // Let the framebuffer reader know where to find the framebuffer
+ IOWR(FRAMEBUFFER_READER_BASE, 0, (alt_u32*)fbi->pixels);
+
+ // Make sure the MSB is set so we bypass the data cache
+ fbi->pixels = (void*)((char*)fbi->pixels + 0x80000000);
+ }
+
+ #if GDISP_HARDWARE_FLUSH
+ static void board_flush(GDisplay* g)
+ {
+ (void) g;
+ }
+ #endif
+
+ #if GDISP_NEED_CONTROL
+ static void board_backlight(GDisplay* g, uint8_t percent)
+ {
+ (void) g;
+ (void) percent;
+ }
+
+ static void board_contrast(GDisplay* g, uint8_t percent)
+ {
+ (void) g;
+ (void) percent;
+ }
+
+ static void board_power(GDisplay* g, powermode_t pwr)
+ {
+ (void) g;
+ (void) pwr;
+ }
+ #endif
+
+#endif /* GDISP_LLD_BOARD_IMPLEMENTATION */
diff --git a/boards/base/Altera-MAX10-Neek/readme.txt b/boards/base/Altera-MAX10-Neek/readme.txt
new file mode 100644
index 00000000..1a043097
--- /dev/null
+++ b/boards/base/Altera-MAX10-Neek/readme.txt
@@ -0,0 +1,9 @@
+This directory contains the board files for the Altera MAX10 NEEK board.
+
+In order to use this board file, the following things are needed:
+ - You need to use the FrameBuffer reader component in QSys
+ - You need to enable the feature of the NIOS-II CPU core that allows to bypass the
+ data cache if the MSB is set.
+
+On this board uGFX currently supports:
+ - GDISP via the framebuffer driver