summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxsu
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-04-17 03:08:30 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-04-17 03:08:30 +0000
commit7acedfe75789174106ff09483c82b5edf527c076 (patch)
treebfd2bca94b6e3f013162a2ff47a3403a2c017575 /nuttx/graphics/nxsu
parent16ae1294c4dfb7465564eb5fa97fdeda1f3fcb21 (diff)
downloadpx4-nuttx-7acedfe75789174106ff09483c82b5edf527c076.tar.gz
px4-nuttx-7acedfe75789174106ff09483c82b5edf527c076.tar.bz2
px4-nuttx-7acedfe75789174106ff09483c82b5edf527c076.zip
Generalize graphics driver type
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2597 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxsu')
-rw-r--r--nuttx/graphics/nxsu/nx_open.c18
-rw-r--r--nuttx/graphics/nxsu/nxfe.h3
2 files changed, 10 insertions, 11 deletions
diff --git a/nuttx/graphics/nxsu/nx_open.c b/nuttx/graphics/nxsu/nx_open.c
index cde501f15..3ba3e6029 100644
--- a/nuttx/graphics/nxsu/nx_open.c
+++ b/nuttx/graphics/nxsu/nx_open.c
@@ -1,7 +1,7 @@
/****************************************************************************
* graphics/nxsu/nx_open.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -108,23 +108,23 @@ static void nxsu_bkgdredraw(NXWINDOW hwnd,
* Name: nxsu_setup
****************************************************************************/
-static inline int nxsu_setup(FAR struct fb_vtable_s *fb,
+static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
FAR struct nxfe_state_s *fe)
{
int ret;
/* Configure the framebuffer device */
- ret = nxbe_fbconfigure(fb, &fe->be);
+ ret = nxbe_configure(dev, &fe->be);
if (ret < 0)
{
- gdbg("nxbe_fbconfigure failed: %d\n", -ret);
+ gdbg("nxbe_configure failed: %d\n", -ret);
errno = -ret;
return ERROR;
}
#if CONFIG_FB_CMAP
- ret = nxbe_colormap(fb);
+ ret = nxbe_colormap(dev);
if (ret < 0)
{
gdbg("nxbe_colormap failed: %d\n", -ret);
@@ -170,7 +170,7 @@ static inline int nxsu_setup(FAR struct fb_vtable_s *fb,
* plus nx_run.
*
* Input Parameters:
- * fb - Vtable "object" of the framebuffer "driver" to use
+ * dev - Vtable "object" of the framebuffer/LCD "driver" to use
*
* Return:
* Success: A non-NULL handle used with subsequent NX accesses
@@ -178,7 +178,7 @@ static inline int nxsu_setup(FAR struct fb_vtable_s *fb,
*
****************************************************************************/
-NXHANDLE nx_open(FAR struct fb_vtable_s *fb)
+NXHANDLE nx_open(FAR NX_DRIVERTYPE *dev)
{
FAR struct nxfe_state_s *fe;
int ret;
@@ -186,7 +186,7 @@ NXHANDLE nx_open(FAR struct fb_vtable_s *fb)
/* Sanity checking */
#ifdef CONFIG_DEBUG
- if (!fb)
+ if (!dev)
{
errno = EINVAL;
return NULL;
@@ -204,7 +204,7 @@ NXHANDLE nx_open(FAR struct fb_vtable_s *fb)
/* Initialize and configure the server */
- ret = nxsu_setup(fb, fe);
+ ret = nxsu_setup(dev, fe);
if (ret < 0)
{
return NULL; /* nxsu_setup sets errno */
diff --git a/nuttx/graphics/nxsu/nxfe.h b/nuttx/graphics/nxsu/nxfe.h
index acfa5e122..aa9fb49a9 100644
--- a/nuttx/graphics/nxsu/nxfe.h
+++ b/nuttx/graphics/nxsu/nxfe.h
@@ -1,7 +1,7 @@
/****************************************************************************
* graphics/nxsu/nxfe.h
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -45,7 +45,6 @@
#include <mqueue.h>
#include <semaphore.h>
-#include <nuttx/fb.h>
#include <nuttx/nx.h>
#include "nxbe.h"