More renaming: up_lcdinitialize->board_lcd_initialize, up_lcdgetdev->board_lcd_getdev, up_lcduninitialize->board_lcd_uninitialize
This commit is contained in:
parent
f6657dc512
commit
02beb0d449
@ -69,7 +69,7 @@ ifeq ($(CONFIG_DEV_CONSOLE),y)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NX_LCDDRIVER),y)
|
||||
CSRCS += up_lcd.c
|
||||
CSRCS += board_lcd.c
|
||||
else
|
||||
CSRCS += up_framebuffer.c
|
||||
ifeq ($(CONFIG_SIM_X11FB),y)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/sim/src/up_lcd.c
|
||||
* arch/sim/src/board_lcd.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -47,6 +47,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
|
||||
/****************************************************************************
|
||||
@ -138,7 +139,7 @@ struct sim_dev_s
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Protototypes
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/* LCD Data Transfer Methods */
|
||||
@ -384,7 +385,7 @@ static int sim_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is
|
||||
@ -393,14 +394,14 @@ static int sim_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
gvdbg("Initializing\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This
|
||||
@ -408,21 +409,20 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
}
|
||||
|
@ -40,6 +40,10 @@
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
|
||||
@ -50,19 +54,26 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/calypso/uwire.h>
|
||||
#include <arch/calypso/clock.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "ssd1783.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* Color depth and format */
|
||||
|
||||
#define LCD_BPP 16
|
||||
#define LCD_COLORFMT FB_FMT_RGB16_555
|
||||
|
||||
/* Display Resolution */
|
||||
# define LCD_XRES 98
|
||||
# define LCD_YRES 67
|
||||
|
||||
#define LCD_XRES 98
|
||||
#define LCD_YRES 67
|
||||
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
@ -448,7 +459,7 @@ static inline void lcd_initialize(void)
|
||||
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -457,7 +468,7 @@ static inline void lcd_initialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
gvdbg("Initializing\n");
|
||||
|
||||
@ -470,7 +481,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -478,7 +489,7 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
@ -486,14 +497,14 @@ FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Un-initialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
lcd_setpower(&g_lcddev.dev, 0);
|
||||
}
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
|
||||
@ -907,7 +908,7 @@ static void lcd_backlight(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -916,7 +917,7 @@ static void lcd_backlight(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
unsigned short id;
|
||||
|
||||
@ -937,7 +938,7 @@ int up_lcdinitialize(void)
|
||||
{
|
||||
/* Not a R61505U ? */
|
||||
|
||||
gdbg("up_lcdinitialize: LCD ctrl is not a R61505U");
|
||||
gdbg("board_lcd_initialize: LCD ctrl is not a R61505U");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -956,7 +957,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -964,21 +965,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Un-initialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
lcd_setpower(&g_lcddev.dev, 0);
|
||||
stm32_deselectlcd();
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ssd1289.h>
|
||||
|
||||
@ -466,7 +467,7 @@ static void stm32_enablefsmc(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -475,7 +476,7 @@ static void stm32_enablefsmc(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* Only initialize the driver once */
|
||||
|
||||
@ -507,7 +508,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -515,21 +516,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return g_ssd1289drvr;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
@ -86,7 +87,7 @@
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -95,7 +96,7 @@
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
gvdbg("Initializing\n");
|
||||
#warning "Missing logic"
|
||||
@ -103,7 +104,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -111,7 +112,7 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
#warning "Missing logic"
|
||||
@ -119,14 +120,14 @@ FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
#warning "Missing logic"
|
||||
}
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/memlcd.h>
|
||||
@ -178,7 +179,7 @@ static FAR struct memlcd_priv_s memlcd_priv =
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is
|
||||
@ -187,7 +188,7 @@ static FAR struct memlcd_priv_s memlcd_priv =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR int up_lcdinitialize(void)
|
||||
FAR int board_lcd_initialize(void)
|
||||
{
|
||||
lcddbg("Initializing lcd\n");
|
||||
|
||||
@ -217,7 +218,7 @@ FAR int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This
|
||||
@ -225,7 +226,7 @@ FAR int up_lcdinitialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return l_lcddev;
|
||||
|
@ -253,19 +253,6 @@ void weak_function stm32_usbinitialize(void);
|
||||
void stm32_lcdinitialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully initialized, display
|
||||
* memory cleared, and the LCD ready to use, but with the power setting at 0 (full off).
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LCD_MIO283QT2) || defined(CONFIG_LCD_MIO283QT9A)
|
||||
int up_lcdinitialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: up_vs1053initialize
|
||||
*
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/mio283qt2.h>
|
||||
|
||||
@ -484,7 +485,7 @@ void stm32_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -493,7 +494,7 @@ void stm32_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* Only initialize the driver once. NOTE: The LCD GPIOs were already configured
|
||||
* by stm32_lcdinitialize.
|
||||
@ -530,7 +531,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -538,21 +539,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return g_stm32f4_lcd.drvr;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/mio283qt9a.h>
|
||||
|
||||
@ -485,7 +486,7 @@ void stm32_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -494,7 +495,7 @@ void stm32_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* Only initialize the driver once. NOTE: The LCD GPIOs were already configured
|
||||
* by stm32_lcdinitialize.
|
||||
@ -531,7 +532,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -539,21 +540,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return g_stm32f4_lcd.drvr;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Uninitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
|
@ -348,7 +348,7 @@ int board_app_initialize(void)
|
||||
|
||||
syslog(LOG_INFO, "Initializing TFT LCD module\n");
|
||||
|
||||
ret = up_lcdinitialize();
|
||||
ret = board_lcd_initialize();
|
||||
if (ret != OK)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize TFT LCD module\n");
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/mio283qt2.h>
|
||||
|
||||
@ -410,7 +411,7 @@ static void pic32mx_backlight(FAR struct mio283qt2_lcd_s *dev, int power)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -419,7 +420,7 @@ static void pic32mx_backlight(FAR struct mio283qt2_lcd_s *dev, int power)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
uint32_t regval;
|
||||
|
||||
@ -485,7 +486,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -493,21 +494,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return g_pic32mx7mmb_lcd.drvr;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
|
@ -118,6 +118,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/video/rgbcolors.h>
|
||||
|
||||
@ -856,7 +857,7 @@ static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -865,7 +866,7 @@ static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
uint16_t hxregval;
|
||||
@ -1038,7 +1039,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows
|
||||
@ -1046,21 +1047,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
lcdvdbg("lcddev: %d\n", lcddev);
|
||||
return lcddev == 0 ? &g_lcddev_s.dev : NULL;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the framebuffer support.
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the LCD off */
|
||||
|
||||
|
@ -125,6 +125,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ili9325.h>
|
||||
#include <nuttx/video/rgbcolors.h>
|
||||
@ -1304,7 +1305,7 @@ static inline int sam_lcd_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -1313,7 +1314,7 @@ static inline int sam_lcd_initialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
int ret;
|
||||
@ -1351,7 +1352,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows
|
||||
@ -1359,21 +1360,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Uninitialize the LCD support
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
|
||||
|
@ -125,6 +125,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ili9341.h>
|
||||
#include <nuttx/video/rgbcolors.h>
|
||||
@ -1183,7 +1184,7 @@ static inline int sam_lcd_initialize(void)
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -1192,7 +1193,7 @@ static inline int sam_lcd_initialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
int ret;
|
||||
@ -1230,7 +1231,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows
|
||||
@ -1238,21 +1239,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Uninitialize the LCD support
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
|
||||
|
@ -755,8 +755,11 @@ Testing has also been performed using the maXTouch Xplained Pro LCD
|
||||
maXTouch Xplained Pro Standard Extension Header
|
||||
-----------------------------------------------
|
||||
The LCD could be connected either via EXT1 or EXT2 using the 2x10 20-pin
|
||||
cable and the maXTouch Xplained Pro standard extension header. Access is
|
||||
then performed in SPI mode.
|
||||
cable and the maXTouch Xplained Pro standard extension header. Access would
|
||||
then be performed in SPI mode.
|
||||
|
||||
NOTE: There is currently no support for use of the LCD in SPI mode. See
|
||||
the next paragraph where the LCD/EXT4 connection is discussion.
|
||||
|
||||
NOTE the 3 switch mode selector on the back of the maXtouch. All switches
|
||||
should be in the ON position to select 4-wire SPI mode.
|
||||
@ -863,6 +866,10 @@ in the OFF-ON-OFF positions to select 16-bit color mode.
|
||||
50 GND - - Ground
|
||||
---- ------------ ---- -------- -----------------------------------------------------------
|
||||
|
||||
NOTE: Use of LCD/EXT4 conflicts with the Arduino RXD pin (PD28). You cannot
|
||||
put the maXTouch Xplained in LCD/EXT4 and also use the Arduino RXD/TXD pins
|
||||
as your serial console.
|
||||
|
||||
Connecting the flat cable. I was embarrassed to say that I did not know how
|
||||
the connectors worked. Let me share this so that, perhaps, I can save you
|
||||
the same embarrassment:
|
||||
@ -878,7 +885,6 @@ the same embarrassment:
|
||||
toward the board. Lock the cable in place by pushing the tabs back in
|
||||
place.
|
||||
|
||||
|
||||
MXT Configuration Options
|
||||
-------------------------
|
||||
|
||||
|
@ -129,6 +129,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/wdog.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
@ -1541,7 +1542,7 @@ static inline int sam_lcd_initialize(void)
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is
|
||||
@ -1550,7 +1551,7 @@ static inline int sam_lcd_initialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
int ret;
|
||||
@ -1628,7 +1629,7 @@ errout_with_waitsem:
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This
|
||||
@ -1636,21 +1637,21 @@ errout_with_waitsem:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Uninitialize the LCD support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct sam_dev_s *priv = &g_lcddev;
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
* 45 PE14 DB14 To TFT LCD (CN13, pin 17)
|
||||
* 46 PE15 DB15 To TFT LCD (CN13, pin 18)
|
||||
*
|
||||
* NOTE: The backlight signl NC_BL (CN13, pin 24) is pulled high and not under
|
||||
* NOTE: The backlight signal NC_BL (CN13, pin 24) is pulled high and not under
|
||||
* software control
|
||||
*
|
||||
* On LCD module:
|
||||
@ -120,6 +120,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
|
||||
@ -1863,7 +1864,7 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv)
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -1872,7 +1873,7 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct stm32_dev_s *priv = &g_lcddev;
|
||||
int ret;
|
||||
@ -1912,7 +1913,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -1920,21 +1921,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct stm32_dev_s *priv = &g_lcddev;
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ssd1289.h>
|
||||
@ -109,7 +110,7 @@ struct stm32_lower_s
|
||||
};
|
||||
|
||||
/**************************************************************************************
|
||||
* Private Function Protototypes
|
||||
* Private Function Prototypes
|
||||
**************************************************************************************/
|
||||
/* Helpers */
|
||||
|
||||
@ -529,7 +530,7 @@ static void stm32_lcdoutput(FAR struct stm32_lower_s *priv)
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -538,7 +539,7 @@ static void stm32_lcdoutput(FAR struct stm32_lower_s *priv)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
FAR struct stm32_lower_s *priv = &g_lcdlower;
|
||||
int i;
|
||||
@ -574,7 +575,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows
|
||||
@ -582,7 +583,7 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
FAR struct stm32_lower_s *priv = &g_lcdlower;
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
@ -590,14 +591,14 @@ FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
FAR struct stm32_lower_s *priv = &g_lcdlower;
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
|
||||
@ -1766,7 +1767,7 @@ static void stm3210e_backlight(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -1775,7 +1776,7 @@ static void stm3210e_backlight(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_PM
|
||||
int ret;
|
||||
@ -1813,7 +1814,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -1821,21 +1822,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
stm3210e_poweroff();
|
||||
stm32_deselectlcd();
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
|
||||
@ -1122,7 +1123,7 @@ static inline void stm3220g_lcdinitialize(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -1131,7 +1132,7 @@ static inline void stm3220g_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
lcdvdbg("Initializing\n");
|
||||
|
||||
@ -1155,7 +1156,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -1163,21 +1164,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
stm3220g_poweroff();
|
||||
stm32_deselectlcd();
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
|
||||
@ -1121,7 +1122,7 @@ static inline void stm3240g_lcdinitialize(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -1130,7 +1131,7 @@ static inline void stm3240g_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
lcdvdbg("Initializing\n");
|
||||
|
||||
@ -1154,7 +1155,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -1162,21 +1163,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
stm3240g_poweroff();
|
||||
stm32_deselectlcd();
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/ili9341.h>
|
||||
#include <nuttx/video/fb.h>
|
||||
|
||||
@ -413,7 +414,7 @@ static int stm32_ili9341_initialize(void)
|
||||
|
||||
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE
|
||||
/****************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD Device.
|
||||
@ -424,7 +425,7 @@ static int stm32_ili9341_initialize(void)
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Set display off */
|
||||
|
||||
@ -435,7 +436,7 @@ void up_lcduninitialize(void)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a reference to the LCD object for the specified LCD Device.
|
||||
@ -449,7 +450,7 @@ void up_lcduninitialize(void)
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
if (lcddev == ILI9341_LCD_DEVICE)
|
||||
{
|
||||
@ -461,7 +462,7 @@ FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is
|
||||
@ -476,7 +477,7 @@ FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* check if always initialized */
|
||||
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ssd1289.h>
|
||||
@ -339,7 +340,7 @@ void stm32_selectlcd(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -348,7 +349,7 @@ void stm32_selectlcd(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* Only initialize the driver once */
|
||||
|
||||
@ -390,7 +391,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -398,21 +399,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return g_ssd1289drvr;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ssd1289.h>
|
||||
|
||||
@ -532,7 +533,7 @@ static void stm32_enablefsmc(void)
|
||||
**************************************************************************************/
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
||||
@ -541,7 +542,7 @@ static void stm32_enablefsmc(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* Only initialize the driver once */
|
||||
|
||||
@ -575,7 +576,7 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
*
|
||||
* Description:
|
||||
* Return a a reference to the LCD object for the specified LCD. This allows support
|
||||
@ -583,21 +584,21 @@ int up_lcdinitialize(void)
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
DEBUGASSERT(lcddev == 0);
|
||||
return g_ssd1289drvr;
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unitialize the LCD support
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* Turn the display off */
|
||||
|
||||
|
@ -49,10 +49,11 @@
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/st7567.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "up_internal.h"
|
||||
@ -103,10 +104,10 @@ FAR struct lcd_dev_s *dev;
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinitialize
|
||||
* Name: board_lcd_initialize
|
||||
****************************************************************************/
|
||||
|
||||
int up_lcdinitialize(void)
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
lpc17_configgpio(ZKITARM_OLED_RST);
|
||||
lpc17_configgpio(ZKITARM_OLED_RS);
|
||||
@ -128,10 +129,10 @@ int up_lcdinitialize(void)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdgetdev
|
||||
* Name: board_lcd_getdev
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
|
||||
{
|
||||
dev = st7567_initialize(spi, lcddev);
|
||||
if (!dev)
|
||||
@ -151,10 +152,10 @@ FAR struct lcd_dev_s *up_lcdgetdev(int lcddev)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcduninitialize
|
||||
* Name: board_lcd_uninitialize
|
||||
****************************************************************************/
|
||||
|
||||
void up_lcduninitialize(void)
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* TO-FIX */
|
||||
}
|
||||
|
@ -107,19 +107,19 @@ int nx_server(int argc, char *argv[])
|
||||
#elif defined(CONFIG_NX_LCDDRIVER)
|
||||
/* Initialize the LCD device */
|
||||
|
||||
ret = up_lcdinitialize();
|
||||
ret = board_lcd_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
gdbg("ERROR: up_lcdinitialize failed: %d\n", ret);
|
||||
gdbg("ERROR: board_lcd_initialize failed: %d\n", ret);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Get the device instance */
|
||||
|
||||
dev = up_lcdgetdev(CONFIG_NXSTART_DEVNO);
|
||||
dev = board_lcd_getdev(CONFIG_NXSTART_DEVNO);
|
||||
if (!dev)
|
||||
{
|
||||
gdbg("ERROR: up_lcdgetdev failed, devno=%d\n", CONFIG_NXSTART_DEVNO);
|
||||
gdbg("ERROR: board_lcd_getdev failed, devno=%d\n", CONFIG_NXSTART_DEVNO);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -272,6 +272,32 @@ FAR struct fb_vtable_s *board_graphics_setup(unsigned int devno);
|
||||
int board_ioctl(unsigned int cmd, uintptr_t arg);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_lcd_initialize, board_lcd_getdev, board_lcd_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* If an architecture supports a parallel or serial LCD, then it must
|
||||
* provide APIs to access the LCD as follows:
|
||||
*
|
||||
* board_lcd_initialize - Initialize the LCD video hardware. The initial
|
||||
* state of the LCD is fully initialized, display
|
||||
* memory cleared, and the LCD ready to use, but
|
||||
* with the power setting at 0 (full off).
|
||||
* board_lcd_getdev - Return a a reference to the LCD object for
|
||||
* the specified LCD. This allows support for
|
||||
* multiple LCD devices.
|
||||
* board_lcd_uninitialize - Uninitialize the LCD support
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
struct lcd_dev_s; /* Forward reference */
|
||||
|
||||
int board_lcd_initialize(void);
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev);
|
||||
void board_lcd_uninitialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_led_initialize
|
||||
*
|
||||
|
@ -184,33 +184,12 @@ struct lcd_dev_s
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinitialize, up_lcdgetdev, up_lcduninitialize
|
||||
*
|
||||
* Description:
|
||||
* If an architecture supports a parallel or serial LCD, then it must
|
||||
* provide APIs to access the LCD as follows:
|
||||
*
|
||||
* up_lcdinitialize - Initialize the LCD video hardware. The initial
|
||||
* state of the LCD is fully initialized, display
|
||||
* memory cleared, and the LCD ready to use, but with
|
||||
* the power setting at 0 (full off).
|
||||
* up_lcdgetdev - Return a a reference to the LCD object for
|
||||
* the specified LCD. This allows support for
|
||||
* multiple LCD devices.
|
||||
* up_lcduninitialize - Unitialize the LCD support
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
EXTERN int up_lcdinitialize(void);
|
||||
EXTERN FAR struct lcd_dev_s *up_lcdgetdev(int lcddev);
|
||||
EXTERN void up_lcduninitialize(void);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user