summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-10 12:03:10 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-10 12:03:10 -0600
commit929a5e7e0682c06a97c77f752fd26eb85e31bcb0 (patch)
treead170f31bbc33e6cc596daa4982a75d8c82eb94e /nuttx/arch
parent17b702fc22453e1e5dd577355da802014d3dc98d (diff)
downloadpx4-nuttx-929a5e7e0682c06a97c77f752fd26eb85e31bcb0.tar.gz
px4-nuttx-929a5e7e0682c06a97c77f752fd26eb85e31bcb0.tar.bz2
px4-nuttx-929a5e7e0682c06a97c77f752fd26eb85e31bcb0.zip
SAMA5D4-EK: LCDC works (with a few color problems)
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/src/sama5/chip/sam_lcdc.h2
-rw-r--r--nuttx/arch/arm/src/sama5/sam_lcd.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/sama5/chip/sam_lcdc.h b/nuttx/arch/arm/src/sama5/chip/sam_lcdc.h
index 447bed1f0..8d311e06f 100644
--- a/nuttx/arch/arm/src/sama5/chip/sam_lcdc.h
+++ b/nuttx/arch/arm/src/sama5/chip/sam_lcdc.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/sama5/chip/sam_lcdc.h
*
- * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/arch/arm/src/sama5/sam_lcd.c b/nuttx/arch/arm/src/sama5/sam_lcd.c
index b3201fa66..d8ce51b71 100644
--- a/nuttx/arch/arm/src/sama5/sam_lcd.c
+++ b/nuttx/arch/arm/src/sama5/sam_lcd.c
@@ -1281,8 +1281,8 @@ static void sam_dmasetup(int lid, struct sam_dscr_s *dscr, uint8_t *buffer)
/* 31.6.2.2 Programming a DMA Channel:
*
* 4. Write the DSCR.CHXNEXT register with the address location
- * of the descriptor structure and set DFETCH field of the
- * DSCR.CHXCTRL register to one.
+ * of the descriptor structure and set DFETCH field of the
+ * DSCR.CHXCTRL register to one.
*/
sam_putreg(g_layeraddr[lid], physbuffer);
@@ -2267,6 +2267,7 @@ static void sam_lcd_enable(void)
regval = LCDC_LCDCFG5_HSPOL | LCDC_LCDCFG5_VSPOL |
LCDC_LCDCFG5_VSPDLYS | LCDC_LCDCFG5_DISPDLY |
LCDC_LCDCFG5_GUARDTIME(BOARD_LCDC_GUARDTIME);
+
#if BOARD_LCDC_OUTPUT_BPP == 16
regval |= LCDC_LCDCFG5_MODE_12BPP;
#elif BOARD_LCDC_OUTPUT_BPP == 16
@@ -2278,6 +2279,7 @@ static void sam_lcd_enable(void)
#else
# error Unknown or undefined output resolution
#endif
+
sam_putreg(SAM_LCDC_LCDCFG5, regval);
regval = BOARD_LCDC_PWMPS | BOARD_LCDC_PWMPOL |