Merge remote-tracking branch 'origin/master' into vnc
This commit is contained in:
commit
c6707e3dc1
@ -9309,7 +9309,7 @@
|
|||||||
adds support for initializing of the ltdc controller and the lcd
|
adds support for initializing of the ltdc controller and the lcd
|
||||||
device connected on the stm32f429i-disco. The following methods are
|
device connected on the stm32f429i-disco. The following methods are
|
||||||
provided for the generic fb interface: up_fbinitialize,
|
provided for the generic fb interface: up_fbinitialize,
|
||||||
up_fbgetvplane, and fb_uninitialize. The following methods are
|
up_fbgetvplane, and up_fbuninitialize. The following methods are
|
||||||
provided for the ltdc interface: up_ltdcgetlayer. From Marco Krahl
|
provided for the ltdc interface: up_ltdcgetlayer. From Marco Krahl
|
||||||
(2014-12-19).
|
(2014-12-19).
|
||||||
* zrch/arm/src/stm32/Kconfig: Add configuration option for ltdc. This
|
* zrch/arm/src/stm32/Kconfig: Add configuration option for ltdc. This
|
||||||
@ -11647,3 +11647,6 @@
|
|||||||
output and the low-level psock interfaces for network I/O. This
|
output and the low-level psock interfaces for network I/O. This
|
||||||
saves a little memory which might be important for small footprint
|
saves a little memory which might be important for small footprint
|
||||||
configurations (2015-04-14).
|
configurations (2015-04-14).
|
||||||
|
* Framebuffer driver: Add a display number to each interface in order
|
||||||
|
to support multiple display devices (2015-04-14).
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/dm320/dm320_framebuffer.c
|
* arch/arm/src/dm320/dm320_framebuffer.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -1361,11 +1361,19 @@ static int dm320_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcurs
|
|||||||
* Name: up_fbinitialize
|
* Name: up_fbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the video hardware
|
* Initialize the framebuffer video hardware associated with the display.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero is returned on success; a negated errno value is returned on any
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int up_fbinitialize(void)
|
int up_fbinitialize(int display)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1388,17 +1396,21 @@ int up_fbinitialize(void)
|
|||||||
* Name: up_fbgetvplane
|
* Name: up_fbgetvplane
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Return a a reference to the framebuffer object for the specified video plane.
|
* Return a a reference to the framebuffer object for the specified video
|
||||||
|
* plane of the specified plane. Many OSDs support multiple planes of video.
|
||||||
*
|
*
|
||||||
* Input parameters:
|
* Input parameters:
|
||||||
* None
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
* vplane - Identifies the plane being queried.
|
||||||
*
|
*
|
||||||
* Returned value:
|
* Returned Value:
|
||||||
* Reference to the framebuffer object (NULL on failure)
|
* A non-NULL pointer to the frame buffer access structure is returned on
|
||||||
|
* success; NULL is returned on any failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
|
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
|
||||||
{
|
{
|
||||||
switch (vplane)
|
switch (vplane)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src//lpc17xx/lpc17_lcd.c
|
* arch/arm/src//lpc17xx/lpc17_lcd.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -455,11 +455,19 @@ static int lpc17_setcursor(FAR struct fb_vtable_s *vtable,
|
|||||||
* Name: up_fbinitialize
|
* Name: up_fbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the framebuffer video hardware
|
* Initialize the framebuffer video hardware associated with the display.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero is returned on success; a negated errno value is returned on any
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int up_fbinitialize(void)
|
int up_fbinitialize(int display)
|
||||||
{
|
{
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
int i;
|
int i;
|
||||||
@ -699,21 +707,24 @@ int up_fbinitialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lpc17_fbgetvplane
|
* Name: up_fbgetvplane
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Return a a reference to the framebuffer object for the specified video
|
* Return a a reference to the framebuffer object for the specified video
|
||||||
* plane.
|
* plane of the specified plane. Many OSDs support multiple planes of video.
|
||||||
*
|
*
|
||||||
* Input parameters:
|
* Input parameters:
|
||||||
* None
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
* vplane - Identifies the plane being queried.
|
||||||
*
|
*
|
||||||
* Returned value:
|
* Returned Value:
|
||||||
* Reference to the framebuffer object (NULL on failure)
|
* A non-NULL pointer to the frame buffer access structure is returned on
|
||||||
|
* success; NULL is returned on any failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
|
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
|
||||||
{
|
{
|
||||||
gvdbg("vplane: %d\n", vplane);
|
gvdbg("vplane: %d\n", vplane);
|
||||||
if (vplane == 0)
|
if (vplane == 0)
|
||||||
@ -727,14 +738,21 @@ FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: fb_uninitialize
|
* Name: up_fbuninitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Unitialize the framebuffer support
|
* Uninitialize the framebuffer support for the specified display.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void fb_uninitialize(void)
|
void up_fbuninitialize(int display)
|
||||||
{
|
{
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/sama5/sam_lcd.c
|
* arch/arm/src/sama5/sam_lcd.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013-2014, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* References:
|
* References:
|
||||||
@ -2893,14 +2893,22 @@ static void sam_show_hcr(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: sam_fbinitialize
|
* Name: up_fbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the framebuffer video hardware
|
* Initialize the framebuffer video hardware associated with the display.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero is returned on success; a negated errno value is returned on any
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int up_fbinitialize(void)
|
int up_fbinitialize(int display)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SAMA5_LCDC_OVR1) && defined(CONFIG_SAMA5_LCDC_HEO)
|
#if defined(CONFIG_SAMA5_LCDC_OVR1) && defined(CONFIG_SAMA5_LCDC_HEO)
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@ -2984,21 +2992,24 @@ int up_fbinitialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: sam_fbgetvplane
|
* Name: up_fbgetvplane
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Return a a reference to the framebuffer object for the specified video
|
* Return a a reference to the framebuffer object for the specified video
|
||||||
* plane.
|
* plane of the specified plane. Many OSDs support multiple planes of video.
|
||||||
*
|
*
|
||||||
* Input parameters:
|
* Input parameters:
|
||||||
* None
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
* vplane - Identifies the plane being queried.
|
||||||
*
|
*
|
||||||
* Returned value:
|
* Returned Value:
|
||||||
* Reference to the framebuffer object (NULL on failure)
|
* A non-NULL pointer to the frame buffer access structure is returned on
|
||||||
|
* success; NULL is returned on any failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
struct fb_vtable_s *up_fbgetvplane(int vplane)
|
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
|
||||||
{
|
{
|
||||||
gvdbg("vplane: %d\n", vplane);
|
gvdbg("vplane: %d\n", vplane);
|
||||||
if (vplane == 0)
|
if (vplane == 0)
|
||||||
@ -3012,15 +3023,21 @@ struct fb_vtable_s *up_fbgetvplane(int vplane)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: fb_uninitialize
|
* Name: up_fbuninitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Uninitialize the framebuffer driver. Bad things will happen if you
|
* Uninitialize the framebuffer support for the specified display.
|
||||||
* call this without first calling fb_initialize()!
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void fb_uninitialize(void)
|
void up_fbuninitialize(int display)
|
||||||
{
|
{
|
||||||
/* Disable the LCD controller */
|
/* Disable the LCD controller */
|
||||||
|
|
||||||
|
@ -3533,7 +3533,7 @@ struct fb_vtable_s *stm32_ltdcgetvplane(int vplane)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: fb_uninitialize
|
* Name: stm32_ltdcuninitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Uninitialize the framebuffer driver. Bad things will happen if you
|
* Uninitialize the framebuffer driver. Bad things will happen if you
|
||||||
|
@ -344,11 +344,19 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable,
|
|||||||
* Name: up_fbinitialize
|
* Name: up_fbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the video hardware
|
* Initialize the framebuffer video hardware associated with the display.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero is returned on success; a negated errno value is returned on any
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int up_fbinitialize(void)
|
int up_fbinitialize(int display)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SIM_X11FB
|
#ifdef CONFIG_SIM_X11FB
|
||||||
return up_x11initialize(CONFIG_SIM_FBWIDTH, CONFIG_SIM_FBHEIGHT,
|
return up_x11initialize(CONFIG_SIM_FBWIDTH, CONFIG_SIM_FBHEIGHT,
|
||||||
@ -363,17 +371,21 @@ int up_fbinitialize(void)
|
|||||||
* Name: up_fbgetvplane
|
* Name: up_fbgetvplane
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Return a a reference to the framebuffer object for the specified video plane.
|
* Return a a reference to the framebuffer object for the specified video
|
||||||
|
* plane of the specified plane. Many OSDs support multiple planes of video.
|
||||||
*
|
*
|
||||||
* Input parameters:
|
* Input parameters:
|
||||||
* None
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
* vplane - Identifies the plane being queried.
|
||||||
*
|
*
|
||||||
* Returned value:
|
* Returned Value:
|
||||||
* Reference to the framebuffer object (NULL on failure)
|
* A non-NULL pointer to the frame buffer access structure is returned on
|
||||||
|
* success; NULL is returned on any failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
|
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
|
||||||
{
|
{
|
||||||
if (vplane == 0)
|
if (vplane == 0)
|
||||||
{
|
{
|
||||||
@ -386,10 +398,21 @@ FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_fbteardown
|
* Name: up_fbuninitialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Uninitialize the framebuffer support for the specified display.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void fb_uninitialize(void)
|
void up_fbuninitialize(int display)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,14 +85,14 @@ static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the frame buffer device */
|
/* Initialize the frame buffer device */
|
||||||
|
|
||||||
ret = up_fbinitialize();
|
ret = up_fbinitialize(0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
gdbg("ERROR: up_fbinitialize failed: %d\n", -ret);
|
gdbg("ERROR: up_fbinitialize failed: %d\n", -ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
vplane = up_fbgetvplane(0);
|
vplane = up_fbgetvplane(0, 0);
|
||||||
if (!vplane)
|
if (!vplane)
|
||||||
{
|
{
|
||||||
gdbg("ERROR: up_fbgetvplane failed\n");
|
gdbg("ERROR: up_fbgetvplane failed\n");
|
||||||
|
@ -677,8 +677,8 @@ nx11
|
|||||||
the simulation is built and can only be eliminated by calling
|
the simulation is built and can only be eliminated by calling
|
||||||
up_simtouchscreen(0) from your application.
|
up_simtouchscreen(0) from your application.
|
||||||
|
|
||||||
b. You must first up_fbinitialize() before calling up_simtouchscreen()
|
b. You must first call up_fbinitialize(0) before calling
|
||||||
or you will get a crash.
|
up_simtouchscreen() or you will get a crash.
|
||||||
|
|
||||||
c. Call sim_tcunininitializee() when you are finished with the
|
c. Call sim_tcunininitializee() when you are finished with the
|
||||||
simulated touchscreen.
|
simulated touchscreen.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* config/sim/src/sim_touchscreen.c
|
* config/sim/src/sim_touchscreen.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -104,14 +104,14 @@ int board_tsc_setup(int minor)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
ivdbg("Initializing framebuffer\n");
|
ivdbg("Initializing framebuffer\n");
|
||||||
ret = up_fbinitialize();
|
ret = up_fbinitialize(0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
idbg("up_fbinitialize failed: %d\n", -ret);
|
idbg("up_fbinitialize failed: %d\n", -ret);
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev = up_fbgetvplane(0);
|
dev = up_fbgetvplane(0, 0);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
{
|
{
|
||||||
idbg("up_fbgetvplane 0 failed\n");
|
idbg("up_fbgetvplane 0 failed\n");
|
||||||
@ -156,7 +156,7 @@ errout_with_nx:
|
|||||||
nx_close(g_simtc.hnx);
|
nx_close(g_simtc.hnx);
|
||||||
goto errout;
|
goto errout;
|
||||||
errout_with_fb:
|
errout_with_fb:
|
||||||
fb_uninitialize();
|
up_fbuninitialize(0);
|
||||||
errout:
|
errout:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* configs/stm32f429i-disco/src/stm32_boot.c
|
* configs/stm32f429i-disco/src/stm32_boot.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012, 2015-2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -134,7 +134,7 @@ void board_initialize(void)
|
|||||||
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE
|
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE
|
||||||
/* Initialize the framebuffer driver */
|
/* Initialize the framebuffer driver */
|
||||||
|
|
||||||
up_fbinitialize();
|
up_fbinitialize(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE
|
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE
|
||||||
|
@ -512,18 +512,23 @@ int board_lcd_initialize(void)
|
|||||||
#endif /* CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE */
|
#endif /* CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE */
|
||||||
|
|
||||||
#ifdef CONFIG_STM32_LTDC
|
#ifdef CONFIG_STM32_LTDC
|
||||||
/************************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_fbinitialize
|
* Name: up_fbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* The generic method to initialize the framebuffer device
|
* Initialize the framebuffer video hardware associated with the display.
|
||||||
*
|
*
|
||||||
* Return:
|
* Input parameters:
|
||||||
* OK - On succes
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
* Returned Value:
|
||||||
|
* Zero is returned on success; a negated errno value is returned on any
|
||||||
|
* failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
int up_fbinitialize(void)
|
int up_fbinitialize(int display)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE
|
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE
|
||||||
int ret;
|
int ret;
|
||||||
@ -546,34 +551,45 @@ int up_fbinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_fbgetvplane
|
* Name: up_fbgetvplane
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* The generic method to get the videoplane.
|
* Return a a reference to the framebuffer object for the specified video
|
||||||
|
* plane of the specified plane. Many OSDs support multiple planes of video.
|
||||||
*
|
*
|
||||||
* Paramater:
|
* Input parameters:
|
||||||
* vplane - Number othe video plane
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
* vplane - Identifies the plane being queried.
|
||||||
*
|
*
|
||||||
* Return:
|
* Returned Value:
|
||||||
* Reference to the fb_vtable_s on success otherwise NULL.
|
* A non-NULL pointer to the frame buffer access structure is returned on
|
||||||
|
* success; NULL is returned on any failure.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
FAR struct fb_vtable_s *up_fbgetvplane(int vplane)
|
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane)
|
||||||
{
|
{
|
||||||
return stm32_ltdcgetvplane(vplane);
|
return stm32_ltdcgetvplane(vplane);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_uninitialize
|
* Name: up_fbuninitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* The generic method to uninitialize the framebuffer device
|
* Uninitialize the framebuffer support for the specified display.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
* Input Parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
void fb_uninitialize(void)
|
void up_fbuninitialize(int display)
|
||||||
{
|
{
|
||||||
stm32_ltdcuninitialize();
|
stm32_ltdcuninitialize();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* graphics/nxmu/nx_start.c
|
* graphics/nxmu/nx_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -128,16 +128,18 @@ int nx_server(int argc, char *argv[])
|
|||||||
(void)dev->setpower(dev, ((3*CONFIG_LCD_MAXPOWER + 3)/4));
|
(void)dev->setpower(dev, ((3*CONFIG_LCD_MAXPOWER + 3)/4));
|
||||||
|
|
||||||
#else /* CONFIG_NX_LCDDRIVER */
|
#else /* CONFIG_NX_LCDDRIVER */
|
||||||
/* Initialize the frame buffer device */
|
/* Initialize the frame buffer device.
|
||||||
|
* REVISIT: display == 0 is assumed.
|
||||||
|
*/
|
||||||
|
|
||||||
ret = up_fbinitialize();
|
ret = up_fbinitialize(0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
gdbg("ERROR: up_fbinitialize failed: %d\n", ret);
|
gdbg("ERROR: up_fbinitialize failed: %d\n", ret);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev = up_fbgetvplane(CONFIG_NXSTART_VPLANE);
|
dev = up_fbgetvplane(0, CONFIG_NXSTART_VPLANE);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
{
|
{
|
||||||
gdbg("ERROR: up_fbgetvplane failed, vplane=%d\n", CONFIG_NXSTART_VPLANE);
|
gdbg("ERROR: up_fbgetvplane failed, vplane=%d\n", CONFIG_NXSTART_VPLANE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* include/nuttx/video/fb.h
|
* include/nuttx/video/fb.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2011, 2013, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -360,23 +360,64 @@ extern "C"
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_fbinitialize, up_fbuninitialize, up_fbgetvplane
|
* If an architecture supports a framebuffer, then it must provide the
|
||||||
|
* following APIs to access the framebuffer.
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_fbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* If an architecture supports a framebuffer, then it must provide APIs
|
* Initialize the framebuffer video hardware associated with the display.
|
||||||
* to access the framebuffer as follows:
|
|
||||||
*
|
*
|
||||||
* up_fbinitialize - Initialize the framebuffer video hardware
|
* Input parameters:
|
||||||
* up_fbgetvplane - Return a a reference to the framebuffer object for
|
* display - In the case of hardware with multiple displays, this
|
||||||
* the specified video plane. Most OSDs support
|
* specifies the display. Normally this is zero.
|
||||||
* multiple planes of video.
|
*
|
||||||
* up_fbuninitialize - Uninitialize the framebuffer support
|
* Returned Value:
|
||||||
|
* Zero is returned on success; a negated errno value is returned on any
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int up_fbinitialize(void);
|
int up_fbinitialize(int display);
|
||||||
FAR struct fb_vtable_s *up_fbgetvplane(int vplane);
|
|
||||||
void fb_uninitialize(void);
|
/****************************************************************************
|
||||||
|
* Name: up_fbgetvplane
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Return a a reference to the framebuffer object for the specified video
|
||||||
|
* plane of the specified plane. Many OSDs support multiple planes of video.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
* vplane - Identifies the plane being queried.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* A non-NULL pointer to the frame buffer access structure is returned on
|
||||||
|
* success; NULL is returned on any failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_fbuninitialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Uninitialize the framebuffer support for the specified display.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* display - In the case of hardware with multiple displays, this
|
||||||
|
* specifies the display. Normally this is zero.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void up_fbuninitialize(int display);
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user