source: rtems/cpukit/libmisc/mouse/serial_mouse.h @ 3d6c1bb

4.115
Last change on this file since 3d6c1bb was 3d6c1bb, checked in by Joel Sherrill <joel.sherrill@…>, on 03/14/11 at 14:56:08

2011-03-14 Joel Sherrill <joel.sherrill@…>

PR 1762/cpukit

  • Makefile.am, preinstall.am, libmisc/Makefile.am, wrapup/Makefile.am: Add generic serial mouse driver and mouse parser. The parser code was in the pc386 BSP but was generic so cleaned up and placed here. Serial mouse driver itself is new.
  • libmisc/mouse/README, libmisc/mouse/mouse_parser.c, libmisc/mouse/mouse_parser.h, libmisc/mouse/serial_mouse.c, libmisc/mouse/serial_mouse.h: New files.
  • Property mode set to 100644
File size: 4.3 KB
Line 
1/**
2 * @file rtems/serial_mouse.h
3 *
4 *  This file describes the Serial Mouse Driver for all boards.
5 *  This driver assumes that the BSP or application will provide
6 *  an implementation of the method bsp_get_serial_mouse_device()
7 *  which tells the driver what serial port device to open() and
8 *  what type of mouse is connected.
9 *
10 *  This driver relies on the Mouse Parser Engine.
11 */
12
13/*
14 *  COPYRIGHT (c) 1989-2011.
15 *  On-Line Applications Research Corporation (OAR).
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.com/license/LICENSE.
20 *
21 *  $Id$
22 */
23
24#ifndef __SERIAL_MOUSE_h__
25#define __SERIAL_MOUSE_h__
26
27/* functions */
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/**
33 *  This macro defines the serial mouse device driver entry points.
34 */
35#define SERIAL_MOUSE_DRIVER_TABLE_ENTRY \
36  { serial_mouse_initialize, serial_mouse_open, serial_mouse_close, \
37    serial_mouse_read, serial_mouse_write, serial_mouse_control }
38
39/**
40 *  @brief Serial Mouse Driver Initialization
41 *
42 *  This method initializes the serial mouse driver.
43 *
44 *  @param[in] major is the mouse device major number
45 *  @param[in] minor is the mouse device minor number
46 *  @param[in] arguments points to device driver arguments
47 */
48rtems_device_driver serial_mouse_initialize(
49  rtems_device_major_number  major,
50  rtems_device_minor_number  minor,
51  void                      *arg
52);
53
54/**
55 *  @brief Serial Mouse Driver Open
56 *
57 *  This method implements the Open device driver entry
58 *  point for the serial mouse driver.
59 *
60 *  @param[in] major is the mouse device major number
61 *  @param[in] minor is the mouse device minor number
62 *  @param[in] arguments points to device driver arguments
63 */
64rtems_device_driver serial_mouse_open(
65  rtems_device_major_number  major,
66  rtems_device_minor_number  minor,
67  void                      *arg
68);
69
70/**
71 *  @brief Serial Mouse Driver Close
72 *
73 *  This method implements the Close device driver entry
74 *  point for the serial mouse driver.
75 *
76 *  @param[in] major is the mouse device major number
77 *  @param[in] minor is the mouse device minor number
78 *  @param[in] arguments points to device driver arguments
79 */
80rtems_device_driver serial_mouse_close(
81  rtems_device_major_number  major,
82  rtems_device_minor_number  minor,
83  void                      *arg
84);
85
86/**
87 *  @brief Serial Mouse Driver Read
88 *
89 *  This method implements the Read device driver entry
90 *  point for the serial mouse driver.
91 *
92 *  @param[in] major is the mouse device major number
93 *  @param[in] minor is the mouse device minor number
94 *  @param[in] arguments points to device driver arguments
95 */
96rtems_device_driver serial_mouse_read(
97  rtems_device_major_number  major,
98  rtems_device_minor_number  minor,
99  void                      *arg
100);
101
102/**
103 *  @brief Serial Mouse Driver Write
104 *
105 *  This method implements the Write device driver entry
106 *  point for the serial mouse driver.
107 *
108 *  @param[in] major is the mouse device major number
109 *  @param[in] minor is the mouse device minor number
110 *  @param[in] arguments points to device driver arguments
111 */
112rtems_device_driver serial_mouse_write(
113  rtems_device_major_number  major,
114  rtems_device_minor_number  minor,
115  void                      *arg
116);
117
118/**
119 *  @brief Serial Mouse Driver IO Control
120 *
121 *  This method implements the IO Control device driver entry
122 *  point for the serial mouse driver.
123 *
124 *  @param[in] major is the mouse device major number
125 *  @param[in] minor is the mouse device minor number
126 *  @param[in] arguments points to device driver arguments
127 */
128rtems_device_driver serial_mouse_control(
129  rtems_device_major_number  major,
130  rtems_device_minor_number  minor,
131  void                      *arg
132);
133
134/**
135 *  @brief Obtain Serial Mouse Configuration Information
136 *
137 *  This method is implemented by the BSP or application and
138 *  tells the driver what device to open() and what type of
139 *  mouse is connected.
140 *
141 *  @param[in] name will point to a string with the device name
142 *             of the serial port with the mouse connected.
143 *  @param[in] type will point to a string with the type of mouse connected.
144 *
145 *  @return This method returns true on success and false on error.
146 */
147bool bsp_get_serial_mouse_device(
148  const char **name,
149  const char **type
150);
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif  /* __tty_drv__  */
Note: See TracBrowser for help on using the repository browser.