source: rtems/cpukit/libmisc/mouse/serial_mouse.h @ a4006fee

4.11
Last change on this file since a4006fee was a4006fee, checked in by Sebastian Huber <sebastian.huber@…>, on Jun 28, 2013 at 7:25:30 PM

mouse: Include missing header file

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