SAMA5D4-EK: LCDC works (with a few color problems)

This commit is contained in:
Gregory Nutt 2014-07-10 12:03:10 -06:00
parent 6563ae07c2
commit c7d53cb927
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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 |