9
0
Fork 0

SAMA5: LCDC driver progress

This commit is contained in:
Gregory Nutt 2013-10-07 12:05:16 -06:00
parent 7066e32582
commit d326bc2cdf
6 changed files with 825 additions and 132 deletions

View File

@ -452,7 +452,7 @@ static int lpc17_setcursor(FAR struct fb_vtable_s *vtable,
****************************************************************************/
/****************************************************************************
* Name: lpc17_fbinitialize
* Name: up_fbinitialize
*
* Description:
* Initialize the framebuffer video hardware
@ -727,7 +727,7 @@ FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
}
/****************************************************************************
* Name: lpc17_fbinitialize
* Name: fb_uninitialize
*
* Description:
* Unitialize the framebuffer support

View File

@ -145,7 +145,7 @@
#define SAM_LCDC_HEOVHEAD_OFFSET 0x037c /* High-End Overlay V DMA Head Register */
#define SAM_LCDC_HEOVADDR_OFFSET 0x0380 /* High-End Overlay V DMA Address Register */
#define SAM_LCDC_HEOVCTRL_OFFSET 0x0384 /* High-End Overlay V DMA Control Register */
#define SAM_LCDC_HEOVNEXT_OFFSET 0x0388 /* High-End Overlay VDMA Next Register */
#define SAM_LCDC_HEOVNEXT_OFFSET 0x0388 /* High-End Overlay V DMA Next Register */
#define SAM_LCDC_HEOCFG0_OFFSET 0x038c /* High-End Overlay Configuration Register 0 */
#define SAM_LCDC_HEOCFG1_OFFSET 0x0390 /* High-End Overlay Configuration Register 1 */
#define SAM_LCDC_HEOCFG2_OFFSET 0x0394 /* High-End Overlay Configuration Register 2 */
@ -541,7 +541,7 @@
#define LCDC_LCDCFG6_PWMPOL (1 << 4) /* Bit 4: LCD Controller PWM Signal Polarity */
#define LCDC_LCDCFG6_PWMCVAL_SHIFT (8) /* Bits 8-15: LCD Controller PWM Compare Value */
#define LCDC_LCDCFG6_PWMCVAL_MASK (0xff << LCDC_LCDCFG6_PWMCVAL_SHIFT)
#define LCDC_LCDCFG6_PWMCVAL(n) ((uint32_t)(n) << LCDC_LCDCFG6_PWMCVAL_SHIFT)
# define LCDC_LCDCFG6_PWMCVAL(n) ((uint32_t)(n) << LCDC_LCDCFG6_PWMCVAL_SHIFT)
/* LCD Controller Enable Register */
@ -584,6 +584,8 @@
#define LCDC_LCDINT_HCR (1 << 12) /* Bit 12: Hardware Cursor Raw Interrupt */
#define LCDC_LCDINT_PP (1 << 13) /* Bit 13: Post Processing Raw Interrupt */
#define LCDC_LCDINT_ALL (0x00003f17)
/* Base Layer Channel Enable Register */
#define LCDC_BASECHER_CH (1 << 0) /* Bit 0: Channel Enable */
@ -1878,4 +1880,17 @@
#define LCDC_HCRCLUT_ACLUT_MASK (0xff << LCDC_HCRCLUT_ACLUT_SHIFT)
# define LCDC_HCRCLUT_ACLUT(n) ((uint32_t)(n) << LCDC_HCRCLUT_ACLUT_SHIFT)
/************************************************************************************
* Public Types
************************************************************************************/
/* DMA channel descriptor. This descriptor must be aligned on a 64-bit boundary. */
struct sam_dscr_s
{
uint32_t addr; /* Frame buffer base address register */
uint32_t ctrl; /* Transfer Control register */
uint32_t next; /* Next descriptor address register */
};
#endif /* __ARCH_ARM_SRC_SAMA5_CHIP_SAM_LCDC_H */

View File

@ -207,7 +207,15 @@
/* LCD Controller - LCDC */
#define PIO_LCD_DAT0 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN0) /* Type: GPIO */
#define PIO_LCD_DAT2 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN2) /* Type: GPIO */
#define PIO_LCD_DAT1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN1) /* Type: GPIO */
#define PIO_LCD_DAT3 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN3) /* Type: GPIO */
#define PIO_LCD_DAT4 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN4) /* Type: GPIO */
#define PIO_LCD_DAT5 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN5) /* Type: GPIO */
#define PIO_LCD_DAT6 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN6) /* Type: GPIO */
#define PIO_LCD_DAT7 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN7) /* Type: GPIO */
#define PIO_LCD_DAT8 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN8) /* Type: GPIO */
#define PIO_LCD_DAT9 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN9) /* Type: GPIO */
#define PIO_LCD_DAT10 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN10) /* Type: GPIO */
#define PIO_LCD_DAT11 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN11) /* Type: GPIO */
#define PIO_LCD_DAT12 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN12) /* Type: GPIO */
@ -222,7 +230,6 @@
#define PIO_LCD_DAT18_2 (PIO_PERIPHC | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN12) /* Type: GPIO */
#define PIO_LCD_DAT19_1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN19) /* Type: GPIO */
#define PIO_LCD_DAT19_2 (PIO_PERIPHC | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN11) /* Type: GPIO */
#define PIO_LCD_DAT2 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN2) /* Type: GPIO */
#define PIO_LCD_DAT20_1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN20) /* Type: GPIO */
#define PIO_LCD_DAT20_2 (PIO_PERIPHC | PIO_CFG_DEFAULT | PIO_PORT_PIOC | PIO_PIN10) /* Type: GPIO */
#define PIO_LCD_DAT21_1 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN21) /* Type: GPIO */
@ -231,13 +238,6 @@
#define PIO_LCD_DAT22_2 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN22) /* Type: GPIO */
#define PIO_LCD_DAT23_1 (PIO_PERIPHC | PIO_CFG_DEFAULT | PIO_PORT_PIOE | PIO_PIN28) /* Type: EBI */
#define PIO_LCD_DAT23_2 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN23) /* Type: GPIO */
#define PIO_LCD_DAT3 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN3) /* Type: GPIO */
#define PIO_LCD_DAT4 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN4) /* Type: GPIO */
#define PIO_LCD_DAT5 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN5) /* Type: GPIO */
#define PIO_LCD_DAT6 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN6) /* Type: GPIO */
#define PIO_LCD_DAT7 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN7) /* Type: GPIO */
#define PIO_LCD_DAT8 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN8) /* Type: GPIO */
#define PIO_LCD_DAT9 (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN9) /* Type: GPIO */
#define PIO_LCD_DEN (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN29) /* Type: GPIO */
#define PIO_LCD_DISP (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN25) /* Type: GPIO */
#define PIO_LCD_HSYNC (PIO_PERIPHA | PIO_CFG_DEFAULT | PIO_PORT_PIOA | PIO_PIN27) /* Type: GPIO */

File diff suppressed because it is too large Load Diff

View File

@ -144,6 +144,18 @@
#define BUTTON_USER1_BIT (1 << BUTTON_USER1)
/* PIO configuration ****************************************************************/
/* LCDC */
#define PIO_LCD_DAT16 PIO_LCD_DAT16_2
#define PIO_LCD_DAT17 PIO_LCD_DAT17_2
#define PIO_LCD_DAT18 PIO_LCD_DAT18_2
#define PIO_LCD_DAT19 PIO_LCD_DAT19_2
#define PIO_LCD_DAT20 PIO_LCD_DAT20_2
#define PIO_LCD_DAT21 PIO_LCD_DAT21_2
#define PIO_LCD_DAT22 PIO_LCD_DAT22_1
#define PIO_LCD_DAT23 PIO_LCD_DAT23_1
/************************************************************************************
* Assembly Language Macros
************************************************************************************/

View File

@ -148,7 +148,9 @@ void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target,
match.dev = dev;
uip_ipaddr_copy(match.target, target);
/* Then remove the entry from the routing table */
/* Find an router entry with the routing table that can forward to this
* address using this device.
*/
ret = net_foreachroute(net_devmatch, &match);
if (ret > 0)