summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/mw-fb/mw_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/mw-fb/mw_fb.c')
-rw-r--r--cpukit/libmisc/mw-fb/mw_fb.c101
1 files changed, 20 insertions, 81 deletions
diff --git a/cpukit/libmisc/mw-fb/mw_fb.c b/cpukit/libmisc/mw-fb/mw_fb.c
index 7ea715a18f..5f3e3e03f4 100644
--- a/cpukit/libmisc/mw-fb/mw_fb.c
+++ b/cpukit/libmisc/mw-fb/mw_fb.c
@@ -1,76 +1,16 @@
/*
-/////////////////////////////////////////////////////////////////////////////
-// $Header$
-//
-// Copyright (c) 2000 - Rosimildo da Silva
-//
-// MODULE DESCRIPTION:
-// Wrapper API around the ioctls calls for the Micro FrameBuffer
-// interface for Embedded Systems
-//
-// All functions returns 0 on success. Any other value should be
-// decoded as an error. A list of errors will be created over time.
-//
-// MODIFICATION/HISTORY:
-//
-// $Log$
-// Revision 1.3 2004/04/15 13:24:46 ralf
-// Remove stray white spaces.
-//
-// Revision 1.2 2003/07/08 08:38:48 ralf
-// 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-//
-// * capture/capture-cli.c: Add config-header support.
-// * capture/capture.c: Add config-header support.
-// * cpuuse/cpuuse.c: Add config-header support.
-// * devnull/devnull.c: Add config-header support.
-// * dummy/dummy.c: Add config-header support.
-// * dumpbuf/dumpbuf.c: Add config-header support.
-// * monitor/mon-command.c: Add config-header support.
-// * monitor/mon-config.c: Add config-header support.
-// * monitor/mon-dname.c: Add config-header support.
-// * monitor/mon-driver.c: Add config-header support.
-// * monitor/mon-extension.c: Add config-header support.
-// * monitor/mon-itask.c: Add config-header support.
-// * monitor/mon-manager.c: Add config-header support.
-// * monitor/mon-monitor.c: Add config-header support.
-// * monitor/mon-mpci.c: Add config-header support.
-// * monitor/mon-object.c: Add config-header support.
-// * monitor/mon-prmisc.c: Add config-header support.
-// * monitor/mon-queue.c: Add config-header support.
-// * monitor/mon-server.c: Add config-header support.
-// * monitor/mon-symbols.c: Add config-header support.
-// * monitor/mon-task.c: Add config-header support.
-// * mw-fb/mw_fb.c: Add config-header support.
-// * mw-fb/mw_uid.c: Add config-header support.
-// * rtmonuse/rtmonuse.c: Add config-header support.
-// * serdbg/serdbg.c: Add config-header support.
-// * serdbg/serdbgio.c: Add config-header support.
-// * serdbg/termios_printk.c: Add config-header support.
-// * shell/cmds.c: Add config-header support.
-// * stackchk/check.c: Add config-header support.
-// * untar/untar.c: Add config-header support.
-//
-// Revision 1.1 2000/08/30 08:21:24 joel
-// 2000-08-26 Rosimildo da Silva <rdasilva@connecttel.com>
-//
-// * Added generic Micro FrameBuffer interface for MicroWindows.
-// This interface allows MicroWindows to under RTEMS. A sample
-// driver has been developed for the pc386 BSP. See
-// pc386/fb_vga.c as a sample.
-// * Added Uniform Input Device interface for MicroWindows.
-// See PC386 bsp for sample drivers for mouse and keyboard (console).
-// * mw-bf: New directory.
-// * Makefile.am, configure.in, wrapup/Makefile.am: Account for mw-fb.
-// * mw-fb/Makefile.am: New file.
-// * mw-fb/mw_fb.c: New file.
-// * mw-fb/mw_fb.h: New file.
-// * mw-fb/mw_uid.c: New file.
-// * mw-fb/mw_uid.h: New file.
-//
-//
-/////////////////////////////////////////////////////////////////////////////
-*/
+ *
+ * Copyright (c) 2000 - Rosimildo da Silva
+ *
+ * MODULE DESCRIPTION:
+ * Wrapper API around the ioctls calls for the Micro FrameBuffer
+ * interface for Embedded Systems
+ *
+ * All functions returns 0 on success. Any other value should be
+ * decoded as an error. A list of errors will be created over time.
+ *
+ * $Id$
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -91,8 +31,6 @@
return ioctl( fd, FB_SCREENINFO, ( void *)info);
}
-
-
/*
* Returns the mode of the graphics subsystem
*/
@@ -104,7 +42,6 @@
return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec );
}
-
/*
* Returns the current collor pallete
*/
@@ -113,7 +50,6 @@
return ioctl( fd, FB_GETPALETTE, ( void *)color );
}
-
/*
* Set the current collor pallete
*/
@@ -134,7 +70,6 @@
return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec );
}
-
/*
* Switch the device back to the default mode of operation.
* In most cases it put the device back to plain text mode.
@@ -161,12 +96,16 @@
}
-
/*
- * This function maps the physical ( kernel mode ) address of the framebuffer device
- * and maps it to the user space address.
+ * This function maps the physical ( kernel mode ) address of the framebuffer
+ * device and maps it to the user space address.
*/
- int ufb_mmap_to_user_space( int fd, void **fb_addr, void *physical_addr, unsigned long size )
+ int ufb_mmap_to_user_space(
+ int fd,
+ void **fb_addr,
+ void *physical_addr,
+ unsigned long size
+ )
{
#ifdef __rtems__
/* RTEMS runs in ring 0, and there is no distinction between