summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/mw-fb
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-04-16 12:06:28 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-04-16 12:06:28 +0000
commitaed742c9a09fc443418ba4ef8f31892ef00df984 (patch)
treee9d0138d2456e7ec94be79b66f1f06181d308743 /cpukit/libmisc/mw-fb
parentRemove stray white spaces. (diff)
downloadrtems-aed742c9a09fc443418ba4ef8f31892ef00df984.tar.bz2
Remove stray white spaces.
Diffstat (limited to 'cpukit/libmisc/mw-fb')
-rw-r--r--cpukit/libmisc/mw-fb/mw_fb.c51
-rw-r--r--cpukit/libmisc/mw-fb/mw_fb.h57
-rw-r--r--cpukit/libmisc/mw-fb/mw_uid.c37
-rw-r--r--cpukit/libmisc/mw-fb/mw_uid.h35
4 files changed, 118 insertions, 62 deletions
diff --git a/cpukit/libmisc/mw-fb/mw_fb.c b/cpukit/libmisc/mw-fb/mw_fb.c
index 133d37f009..7ea715a18f 100644
--- a/cpukit/libmisc/mw-fb/mw_fb.c
+++ b/cpukit/libmisc/mw-fb/mw_fb.c
@@ -3,17 +3,20 @@
// $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
+// 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>
//
@@ -77,7 +80,7 @@
#include <rtems/mw_fb.h>
-/*
+/*
* This function returns the information regarding the display.
* It is called just after the driver be opened to get all needed
* information about the driver. No change in the mode of operation
@@ -90,8 +93,8 @@
-/*
- * Returns the mode of the graphics subsystem
+/*
+ * Returns the mode of the graphics subsystem
*/
int ufb_get_mode( int fd, int *mode )
{
@@ -102,8 +105,8 @@
}
-/*
- * Returns the current collor pallete
+/*
+ * Returns the current collor pallete
*/
int ufb_get_palette( int fd, struct fb_cmap *color )
{
@@ -111,17 +114,17 @@
}
-/*
- * Set the current collor pallete
+/*
+ * Set the current collor pallete
*/
int ufb_set_palette( int fd, struct fb_cmap *color )
{
return ioctl( fd, FB_SETPALETTE, ( void *)color );
}
-/*
- * Does all necessary initialization to put the device in
- * graphics mode
+/*
+ * Does all necessary initialization to put the device in
+ * graphics mode
*/
int ufb_enter_graphics( int fd, int mode )
{
@@ -132,7 +135,7 @@
}
-/*
+/*
* Switch the device back to the default mode of operation.
* In most cases it put the device back to plain text mode.
*/
@@ -144,10 +147,10 @@
return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec );
}
-/*
- * Tell the driver that the "virtual buffer" is dirty, and an update
- * of it to the real device, maybe a serial/parallel LCD or whatever
- * is required
+/*
+ * Tell the driver that the "virtual buffer" is dirty, and an update
+ * of it to the real device, maybe a serial/parallel LCD or whatever
+ * is required
*/
int ufb_buffer_is_dirty( int fd )
{
@@ -159,7 +162,7 @@
-/*
+/*
* This function maps the physical ( kernel mode ) address of the framebuffer device
* and maps it to the user space address.
*/
@@ -167,13 +170,13 @@
{
#ifdef __rtems__
/* RTEMS runs in ring 0, and there is no distinction between
- user space and kernel space, so we just return the same
+ user space and kernel space, so we just return the same
pointer to the caller.
*/
*fb_addr = physical_addr;
return 0;
#else
- /* other kernels might want to map it to the user space,
+ /* other kernels might want to map it to the user space,
maybe using mmap()
*/
return 0;
@@ -182,7 +185,7 @@
}
-/*
+/*
* This function unmaps memory of the FB from the user's space
*/
int ufb_unmmap_from_user_space( int fd, void *addr )
diff --git a/cpukit/libmisc/mw-fb/mw_fb.h b/cpukit/libmisc/mw-fb/mw_fb.h
index ab965c1cb4..fb7b6f6170 100644
--- a/cpukit/libmisc/mw-fb/mw_fb.h
+++ b/cpukit/libmisc/mw-fb/mw_fb.h
@@ -3,13 +3,30 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
-//
-// MODULE DESCRIPTION:
+//
+// MODULE DESCRIPTION:
// Micro FrameBuffer interface for Embedded Systems.
//
// MODIFICATION/HISTORY:
//
// $Log$
+// 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.
+//
//
/////////////////////////////////////////////////////////////////////////////
*/
@@ -77,7 +94,7 @@ struct fb_cmap {
#define FB_FUNC_IS_DIRTY 2
#define FB_FUNC_GET_MODE 3
-struct fb_exec_function
+struct fb_exec_function
{
int func_no;
void *param;
@@ -86,7 +103,7 @@ struct fb_exec_function
/* Micro Framebuffer API Wrapper */
-/*
+/*
* This function returns the information regarding the display.
* It is called just after the driver be opened to get all needed
* information about the driver. No change in the mode of operation
@@ -95,45 +112,45 @@ struct fb_exec_function
extern int ufb_get_screen_info( int fd, struct fb_screeninfo *info );
-/*
- * Returns the mode of the graphics subsystem
+/*
+ * Returns the mode of the graphics subsystem
*/
extern int ufb_get_mode( int fd, int *mode );
-/*
- * Returns the current collor pallete
+/*
+ * Returns the current collor pallete
*/
extern int ufb_get_palette( int fd, struct fb_cmap *color );
-/*
- * Set the current collor pallete
+/*
+ * Set the current collor pallete
*/
extern int ufb_set_palette( int fd, struct fb_cmap *color );
-/*
- * Does all necessary initialization to put the device in
- * graphics mode
+/*
+ * Does all necessary initialization to put the device in
+ * graphics mode
*/
extern int ufb_enter_graphics( int fd, int mode );
-/*
+/*
* Switch the device back to the default mode of operation.
* In most cases it put the device back to plain text mode.
*/
extern int ufb_exit_graphics( int fd );
-/*
- * Tell the driver that the "virtual buffer" is dirty, and an update
- * of it to the real device, maybe a serial/parallel LCD or whatever
- * is required
+/*
+ * Tell the driver that the "virtual buffer" is dirty, and an update
+ * of it to the real device, maybe a serial/parallel LCD or whatever
+ * is required
*/
extern int ufb_buffer_is_dirty( int fd );
-/*
+/*
* This function maps the physical ( kernel mode ) address of the framebuffer device
* and maps it to the user space address.
*/
@@ -141,7 +158,7 @@ extern int ufb_buffer_is_dirty( int fd );
-/*
+/*
* This function unmaps memory of the FB from the user's space
*/
int ufb_unmmap_from_user_space( int fd, void *addr );
diff --git a/cpukit/libmisc/mw-fb/mw_uid.c b/cpukit/libmisc/mw-fb/mw_uid.c
index c75ecd36e5..07cfca5571 100644
--- a/cpukit/libmisc/mw-fb/mw_uid.c
+++ b/cpukit/libmisc/mw-fb/mw_uid.c
@@ -3,8 +3,8 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
-//
-// MODULE DESCRIPTION:
+//
+// MODULE DESCRIPTION:
// This module implements the input devices interface used by MicroWindows
// in an embedded system environment.
// It uses the RTEMS message queue as the repository for the messages posted
@@ -13,6 +13,25 @@
// MODIFICATION/HISTORY:
//
// $Log$
+// Revision 1.6 2004/03/26 06:59:18 ralf
+// 2004-03-26 Ralf Corsepius <ralf_corsepius@rtems.org>
+//
+// * libmisc/capture/capture-cli.c, libmisc/capture/capture.c,
+// libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.c,
+// libmisc/devnull/devnull.c, libmisc/fsmount/fsmount.h,
+// libmisc/monitor/mon-config.c, libmisc/monitor/mon-dname.c,
+// libmisc/monitor/mon-driver.c, libmisc/monitor/mon-extension.c,
+// libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c,
+// libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c,
+// libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c,
+// libmisc/monitor/mon-server.c, libmisc/monitor/mon-symbols.c,
+// libmisc/monitor/monitor.h, libmisc/monitor/symbols.h,
+// libmisc/mw-fb/mw_uid.c, libmisc/rtmonuse/rtmonuse.c,
+// libmisc/serdbg/serdbg.h, libmisc/serdbg/serdbgio.c,
+// libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h,
+// libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/stackchk/check.c,
+// libmisc/stackchk/internal.h: Convert to using c99 fixed size types.
+//
// Revision 1.5 2003/07/08 08:38:48 ralf
// 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
//
@@ -137,7 +156,7 @@ int uid_open_queue( const char *q_name, int flags, size_t max_msgs )
#ifdef MW_DEBUG_ON
printk( "UID_Queue: id=%X\n", queue_id );
#endif
- }
+ }
open_count++;
return 0;
}
@@ -186,7 +205,7 @@ int uid_read_message( struct MW_UID_MESSAGE *m, unsigned long timeout )
}
-/*
+/*
* add a message to the queue of events. This method cna be used to
* simulate hardware events, and it can be very handy during development
* a new interface.
@@ -194,14 +213,14 @@ int uid_read_message( struct MW_UID_MESSAGE *m, unsigned long timeout )
int uid_send_message( struct MW_UID_MESSAGE *m )
{
rtems_status_code status;
- status = rtems_message_queue_send( queue_id, ( void * )m,
+ status = rtems_message_queue_send( queue_id, ( void * )m,
sizeof( struct MW_UID_MESSAGE ) );
return status == RTEMS_SUCCESSFUL ? 0 : -1;
}
-/*
+/*
* register the device to insert events to the message
- * queue named as the value passed in q_name
+ * queue named as the value passed in q_name
*/
int uid_register_device( int fd, const char *q_name )
{
@@ -217,11 +236,11 @@ int uid_unregister_device( int fd )
/* set the keyboard */
int uid_set_kbd_mode( int fd, int mode, int *old_mode )
{
- if (ioctl( fd, MV_KDGKBMODE, old_mode) < 0)
+ if (ioctl( fd, MV_KDGKBMODE, old_mode) < 0)
{
return -1;
}
- if (ioctl(fd, MV_KDSKBMODE, mode ) < 0 )
+ if (ioctl(fd, MV_KDSKBMODE, mode ) < 0 )
{
return -1;
}
diff --git a/cpukit/libmisc/mw-fb/mw_uid.h b/cpukit/libmisc/mw-fb/mw_uid.h
index 459c3a057c..2bfc258057 100644
--- a/cpukit/libmisc/mw-fb/mw_uid.h
+++ b/cpukit/libmisc/mw-fb/mw_uid.h
@@ -3,14 +3,31 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
-//
-// MODULE DESCRIPTION:
+//
+// MODULE DESCRIPTION:
// This module defines the interface for input devices used by MicroWindows
// in an embedded system environment.
//
// MODIFICATION/HISTORY:
//
// $Log$
+// 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.
+//
//
/////////////////////////////////////////////////////////////////////////////
*/
@@ -21,13 +38,13 @@
extern "C" {
#endif
-/* 0x41XX -- IOCLT functions for the Micro Input Devices commands */
+/* 0x41XX -- IOCLT functions for the Micro Input Devices commands */
#define MW_UID_REGISTER_DEVICE 0x4100
#define MW_UID_UNREGISTER_DEVICE 0x4101
/* devices supported by MicroWindows */
-enum MW_INPUT_DEVICE_TYPE
+enum MW_INPUT_DEVICE_TYPE
{
MV_UID_INVALID = 0,
MV_UID_REL_POS = 1, /* mouse */
@@ -53,7 +70,7 @@ enum MW_INPUT_DEVICE_TYPE
/* keyboard modes -- default ASCII */
#define MV_KEY_MODE_ASCII 0x01
-/*
+/*
* This mode one event is sent when a key is pressed,
* and another one is send when a key is released.
*/
@@ -68,7 +85,7 @@ enum MW_INPUT_DEVICE_TYPE
#define MV_KDSKBMODE 0x4B45 /* sets current keyboard mode */
/*
- * Message generated by input devices controlled by MicroWindows.
+ * Message generated by input devices controlled by MicroWindows.
*/
struct MW_UID_MESSAGE
{
@@ -102,7 +119,7 @@ struct MW_UID_MESSAGE
/*
* API for creating/closing/accessing the message queue used by the micro
- * input device interface. All functions in this interface returns a
+ * input device interface. All functions in this interface returns a
* zero ( 0 ) on success. One exception for that is the "read" routine
* that returns the number of bytes read. Negaive numbers indicate errors
*
@@ -117,8 +134,8 @@ extern int uid_open_queue( const char *q_name, int flags, size_t max_msgs );
/* closes message queue */
extern int uid_close_queue( void );
-/*
- * reads a message from the queue. It waits up to the specified
+/*
+ * reads a message from the queue. It waits up to the specified
* timeout in mili-seconds.
*/
extern int uid_read_message( struct MW_UID_MESSAGE *m, unsigned long timeout );