diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-28 17:55:04 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-28 17:55:04 +0000 |
commit | ac8ea51694e278757ac0fb947b28d65806f80d55 (patch) | |
tree | 4e04dd9462921b7a1e60816b5cc82db92e1dbbb4 /nuttx/arch/arm/src/dm320/dm320_framebuffer.c | |
parent | 8c8ac1bef17f02fbfda09719bb0907d6ef818021 (diff) | |
download | px4-nuttx-ac8ea51694e278757ac0fb947b28d65806f80d55.tar.gz px4-nuttx-ac8ea51694e278757ac0fb947b28d65806f80d55.tar.bz2 px4-nuttx-ac8ea51694e278757ac0fb947b28d65806f80d55.zip |
Standardize framebuffer APIs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1330 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/dm320/dm320_framebuffer.c')
-rw-r--r-- | nuttx/arch/arm/src/dm320/dm320_framebuffer.c | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/nuttx/arch/arm/src/dm320/dm320_framebuffer.c b/nuttx/arch/arm/src/dm320/dm320_framebuffer.c index 3535dfe1e..3cd890e5d 100644 --- a/nuttx/arch/arm/src/dm320/dm320_framebuffer.c +++ b/nuttx/arch/arm/src/dm320/dm320_framebuffer.c @@ -1357,6 +1357,10 @@ static int dm320_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcurs /**************************************************************************** * Name: up_fbinitialize + * + * Description: + * Initialize the video hardware + * ****************************************************************************/ int up_fbinitialize(void) @@ -1379,46 +1383,43 @@ int up_fbinitialize(void) } /**************************************************************************** - * Name: up_getvid0vtable - ****************************************************************************/ + * Name: up_fbgetvplane + * + * Description: + * Return a a reference to the framebuffer object for the specified video plane. + * + * Input parameters: + * None + * + * Returned value: + * Reference to the framebuffer object (NULL on failure) + * + ***************************************************************************/ -#ifndef CONFIG_DM320_VID0_DISABLE -FAR struct fb_vtable_s up_getvid0vtable(void) +FAR struct fb_vtable_s *up_fbgetvplane(int vplane) { - return g_vid0vtable; -} + switch (vplane) + { +#ifndef CONFIG_DM320_VID0_DISABLE + case DM320_VIDWIN0: /* VID0 window */ + return &g_vid0vtable; #endif - -/**************************************************************************** - * Name: up_getvid1vtable - ****************************************************************************/ - #ifndef CONFIG_DM320_VID1_DISABLE -FAR struct fb_vtable_s up_getvid1vtable(void) -{ - return g_vid1vtable; -} + case DM320_VIDWIN1: /* VID1 window */ + return &g_vid1vtable; #endif - -/**************************************************************************** - * Name: up_getosd0vtable - ****************************************************************************/ - #ifndef CONFIG_DM320_OSD0_DISABLE -FAR struct fb_vtable_s up_getosd0vtable(void) -{ - return g_osd0vtable; -} + case DM320_OSDWIN0: /* OSD2 window */ + return &g_osd0vtable; #endif - -/**************************************************************************** - * Name: up_getosd1vtable - ****************************************************************************/ - #ifndef CONFIG_DM320_OSD1_DISABLE -FAR struct fb_vtable_s up_getosd1vtable(void) -{ - return g_osd1vtable; + case DM320_OSDWIN1: /* OSD2 window */ + return &g_osd1vtable; +#endif + default: + break; + } + return NULL; } #endif @@ -1426,7 +1427,7 @@ FAR struct fb_vtable_s up_getosd1vtable(void) * Name: up_fbteardown ****************************************************************************/ -void cleanup_module(void) +void fb_teardown(void) { /* Disable the hardware */ |