9
0
Fork 0

More renaming: up_lcdinitialize->board_lcd_initialize, up_lcdgetdev->board_lcd_getdev, up_lcduninitialize->board_lcd_uninitialize

This commit is contained in:
Gregory Nutt 2015-04-04 11:49:15 -06:00
parent 6c0df9bdef
commit b262b5a5c6
39 changed files with 291 additions and 234 deletions

View File

@ -41,6 +41,7 @@
#include <sys/types.h>
#include <sys/boardctl.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
@ -48,6 +49,8 @@
#include <cerrno>
#include <debug.h>
#include <nuttx/board.h>
#ifdef CONFIG_NX_MULTIUSER
# include <sched.h>
# include <pthread.h>
@ -138,19 +141,19 @@ bool CNxServer::connect(void)
// Initialize the LCD device
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
gdbg("up_lcdinitialize failed: %d\n", -ret);
gdbg("board_lcd_initialize failed: %d\n", -ret);
return false;
}
// Get the device instance
m_hDevice = up_lcdgetdev(CONFIG_NXWIDGETS_DEVNO);
m_hDevice = board_lcd_getdev(CONFIG_NXWIDGETS_DEVNO);
if (!m_hDevice)
{
gdbg("up_lcdgetdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO);
gdbg("board_lcd_getdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO);
return false;
}
@ -368,19 +371,19 @@ int CNxServer::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("up_lcdinitialize failed: %d\n", -ret);
gdbg("board_lcd_initialize failed: %d\n", -ret);
return EXIT_FAILURE;
}
// Get the device instance
dev = up_lcdgetdev(CONFIG_NXWIDGETS_DEVNO);
dev = board_lcd_getdev(CONFIG_NXWIDGETS_DEVNO);
if (!dev)
{
gdbg("up_lcdgetdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO);
gdbg("board_lcd_getdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO);
return EXIT_FAILURE;
}

View File

@ -42,6 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <nuttx/board.h>
#include <nuttx/lcd/lcd.h>
#include <nuttx/nx/nxglib.h>
@ -116,20 +117,21 @@ static inline int lcdrw_initialize(FAR struct lcdrw_instance_s *inst)
/* Initialize the LCD device */
printf("screens_initialize: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
fprintf(stderr, "screens_initialize: up_lcdinitialize failed: %d\n", -ret);
fprintf(stderr, "screens_initialize: board_lcd_initialize failed: %d\n", -ret);
return ret;
}
/* Get the device instance. */
printf("Get LCD instance\n");
inst->dev = up_lcdgetdev(CONFIG_EXAMPLES_LDCRW_DEVNO);
inst->dev = board_lcd_getdev(CONFIG_EXAMPLES_LDCRW_DEVNO);
if (!inst->dev)
{
fprintf(stderr, "up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_LDCRW_DEVNO);
fprintf(stderr, "board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_LDCRW_DEVNO);
return ret;
}

View File

@ -41,6 +41,7 @@
#include <sys/types.h>
#include <sys/boardctl.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
@ -52,13 +53,15 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#ifdef CONFIG_NX_LCDDRIVER
# include <nuttx/lcd/lcd.h>
#else
# include <nuttx/video/fb.h>
#endif
#include <nuttx/arch.h>
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxtk.h>
#include <nuttx/nx/nxfonts.h>
@ -441,20 +444,21 @@ static inline int nxeg_suinitialize(void)
/* Initialize the LCD device */
printf("nxeg_initialize: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nxeg_initialize: up_lcdinitialize failed: %d\n", -ret);
printf("nxeg_initialize: board_lcd_initialize failed: %d\n", -ret);
g_exitcode = NXEXIT_LCDINITIALIZE;
return ERROR;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NX_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NX_DEVNO);
if (!dev)
{
printf("nxeg_initialize: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NX_DEVNO);
printf("nxeg_initialize: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NX_DEVNO);
g_exitcode = NXEXIT_LCDGETDEV;
return ERROR;
}

View File

@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <sys/boardctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -48,6 +49,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/nx/nx.h>
#ifdef CONFIG_NX_LCDDRIVER
@ -106,19 +108,20 @@ int nx_servertask(int argc, char *argv[])
/* Initialize the LCD device */
printf("nx_servertask: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nx_servertask: up_lcdinitialize failed: %d\n", -ret);
printf("nx_servertask: board_lcd_initialize failed: %d\n", -ret);
return 1;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NX_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NX_DEVNO);
if (!dev)
{
printf("nx_servertask: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NX_DEVNO);
printf("nx_servertask: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NX_DEVNO);
return 2;
}

View File

@ -53,13 +53,15 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#ifdef CONFIG_NX_LCDDRIVER
# include <nuttx/lcd/lcd.h>
#else
# include <nuttx/video/fb.h>
#endif
#include <nuttx/arch.h>
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxglib.h>
#include <nuttx/nx/nxfonts.h>
@ -142,20 +144,21 @@ static inline int nxhello_initialize(void)
/* Initialize the LCD device */
printf("nxhello_initialize: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nxhello_initialize: up_lcdinitialize failed: %d\n", -ret);
printf("nxhello_initialize: board_lcd_initialize failed: %d\n", -ret);
g_nxhello.code = NXEXIT_LCDINITIALIZE;
return ERROR;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NXHELLO_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXHELLO_DEVNO);
if (!dev)
{
printf("nxhello_initialize: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NXHELLO_DEVNO);
printf("nxhello_initialize: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXHELLO_DEVNO);
g_nxhello.code = NXEXIT_LCDGETDEV;
return ERROR;
}

View File

@ -53,13 +53,15 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#ifdef CONFIG_NX_LCDDRIVER
# include <nuttx/lcd/lcd.h>
#else
# include <nuttx/video/fb.h>
#endif
#include <nuttx/arch.h>
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxglib.h>
#include <nuttx/nx/nxfonts.h>
@ -146,20 +148,21 @@ static inline int nximage_initialize(void)
/* Initialize the LCD device */
printf("nximage_initialize: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nximage_initialize: up_lcdinitialize failed: %d\n", -ret);
printf("nximage_initialize: board_lcd_initialize failed: %d\n", -ret);
g_nximage.code = NXEXIT_LCDINITIALIZE;
return ERROR;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NXIMAGE_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXIMAGE_DEVNO);
if (!dev)
{
printf("nximage_initialize: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NXIMAGE_DEVNO);
printf("nximage_initialize: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXIMAGE_DEVNO);
g_nximage.code = NXEXIT_LCDGETDEV;
return ERROR;
}

View File

@ -50,13 +50,15 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#ifdef CONFIG_NX_LCDDRIVER
# include <nuttx/lcd/lcd.h>
#else
# include <nuttx/video/fb.h>
#endif
#include <nuttx/arch.h>
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxglib.h>
@ -137,20 +139,21 @@ static inline int nxlines_initialize(void)
/* Initialize the LCD device */
printf("nxlines_initialize: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nxlines_initialize: up_lcdinitialize failed: %d\n", -ret);
printf("nxlines_initialize: board_lcd_initialize failed: %d\n", -ret);
g_nxlines.code = NXEXIT_LCDINITIALIZE;
return ERROR;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NXLINES_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXLINES_DEVNO);
if (!dev)
{
printf("nxlines_initialize: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NXLINES_DEVNO);
printf("nxlines_initialize: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXLINES_DEVNO);
g_nxlines.code = NXEXIT_LCDGETDEV;
return ERROR;
}

View File

@ -48,6 +48,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/nx/nx.h>
#ifdef CONFIG_NX_LCDDRIVER
@ -103,19 +104,20 @@ int nxterm_server(int argc, char *argv[])
/* Initialize the LCD device */
printf("nxterm_server: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nxterm_server: up_lcdinitialize failed: %d\n", -ret);
printf("nxterm_server: board_lcd_initialize failed: %d\n", -ret);
return 1;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NXCON_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXCON_DEVNO);
if (!dev)
{
printf("nxterm_server: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NXCON_DEVNO);
printf("nxterm_server: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXCON_DEVNO);
return 2;
}

View File

@ -52,13 +52,15 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#ifdef CONFIG_NX_LCDDRIVER
# include <nuttx/lcd/lcd.h>
#else
# include <nuttx/video/fb.h>
#endif
#include <nuttx/arch.h>
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxglib.h>
#include <nuttx/nx/nxfonts.h>
@ -183,20 +185,21 @@ static inline int nxtext_suinitialize(void)
/* Initialize the LCD device */
printf("nxtext_initialize: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nxtext_initialize: up_lcdinitialize failed: %d\n", -ret);
printf("nxtext_initialize: board_lcd_initialize failed: %d\n", -ret);
g_exitcode = NXEXIT_LCDINITIALIZE;
return ERROR;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NXTEXT_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXTEXT_DEVNO);
if (!dev)
{
printf("nxtext_initialize: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NXTEXT_DEVNO);
printf("nxtext_initialize: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXTEXT_DEVNO);
g_exitcode = NXEXIT_LCDGETDEV;
return ERROR;
}

View File

@ -47,6 +47,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/nx/nx.h>
#ifdef CONFIG_NX_LCDDRIVER
@ -105,19 +106,20 @@ int nxtext_server(int argc, char *argv[])
/* Initialize the LCD device */
printf("nxtext_server: Initializing LCD\n");
ret = up_lcdinitialize();
ret = board_lcd_initialize();
if (ret < 0)
{
printf("nxtext_server: up_lcdinitialize failed: %d\n", -ret);
printf("nxtext_server: board_lcd_initialize failed: %d\n", -ret);
return 1;
}
/* Get the device instance */
dev = up_lcdgetdev(CONFIG_EXAMPLES_NXTEXT_DEVNO);
dev = board_lcd_getdev(CONFIG_EXAMPLES_NXTEXT_DEVNO);
if (!dev)
{
printf("nxtext_server: up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_NXTEXT_DEVNO);
printf("nxtext_server: board_lcd_getdev failed, devno=%d\n",
CONFIG_EXAMPLES_NXTEXT_DEVNO);
return 2;
}

View File

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

View File

@ -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)
{
}

View File

@ -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);
}

View File

@ -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();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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");

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

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

View File

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

View File

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

View File

@ -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 */
}

View File

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

View File

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

View File

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