source: rtems/cpukit/include/rtems/serial_mouse.h @ 963c6c2

5
Last change on this file since 963c6c2 was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 4.6 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.org/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 * @brief Standard device file path for a PS2 mouse device.
42 */
43#define SERIAL_MOUSE_DEVICE_PS2 "/dev/psaux"
44
45/**
46 *  This macro defines the serial mouse device driver entry points.
47 */
48#define SERIAL_MOUSE_DRIVER_TABLE_ENTRY \
49  { serial_mouse_initialize, serial_mouse_open, serial_mouse_close, \
50    serial_mouse_read, serial_mouse_write, serial_mouse_control }
51
52/**
53 * @brief The initialization of the serial mouse driver.
54 *
55 * This method initializes the serial mouse driver.
56 *
57 * @param[in] major is the mouse device major number
58 * @param[in] minor is the mouse device minor number
59 * @param[in] arg points to device driver arguments
60 */
61rtems_device_driver serial_mouse_initialize(
62  rtems_device_major_number  major,
63  rtems_device_minor_number  minor,
64  void                      *arg
65);
66
67/**
68 * @brief Open device driver entry point for the serial mouse driver.
69 *
70 * This method implements the Open device driver entry
71 * point for the serial mouse driver.
72 *
73 * @param[in] major is the mouse device major number
74 * @param[in] minor is the mouse device minor number
75 * @param[in] arg points to device driver arguments
76 */
77rtems_device_driver serial_mouse_open(
78  rtems_device_major_number  major,
79  rtems_device_minor_number  minor,
80  void                      *arg
81);
82
83/**
84 * @brief Close device driver entry point for the serial mouse driver.
85 *
86 * This method implements the Close device driver entry
87 * point for the serial mouse driver.
88 *
89 * @param[in] major is the mouse device major number
90 * @param[in] minor is the mouse device minor number
91 * @param[in] arg points to device driver arguments
92 */
93rtems_device_driver serial_mouse_close(
94  rtems_device_major_number  major,
95  rtems_device_minor_number  minor,
96  void                      *arg
97);
98
99/**
100 * @brief Read device driver entry point for the serial mouse driver.
101 *
102 * This method implements the Read device driver entry
103 * point for the serial mouse driver.
104 *
105 * @param[in] major is the mouse device major number
106 * @param[in] minor is the mouse device minor number
107 * @param[in] arg points to device driver arguments
108 */
109rtems_device_driver serial_mouse_read(
110  rtems_device_major_number  major,
111  rtems_device_minor_number  minor,
112  void                      *arg
113);
114
115/**
116 * @brief Write device driver entry point for the serial mouse driver.
117 *
118 * This method implements the Write device driver entry
119 * point for the serial mouse driver.
120 *
121 * @param[in] major is the mouse device major number
122 * @param[in] minor is the mouse device minor number
123 * @param[in] arg points to device driver arguments
124 */
125rtems_device_driver serial_mouse_write(
126  rtems_device_major_number  major,
127  rtems_device_minor_number  minor,
128  void                      *arg
129);
130
131/**
132 * @brief IO Control device driver entry point for the serial mouse driver.
133 *
134 * This method implements the IO Control device driver entry
135 * point for the serial mouse driver.
136 *
137 * @param[in] major is the mouse device major number
138 * @param[in] minor is the mouse device minor number
139 * @param[in] arg points to device driver arguments
140 */
141rtems_device_driver serial_mouse_control(
142  rtems_device_major_number  major,
143  rtems_device_minor_number  minor,
144  void                      *arg
145);
146
147/**
148 * @brief Obtain serial mouse configuration information.
149 *
150 * This method is implemented by the BSP or application and
151 * tells the driver what device to open() and what type of
152 * mouse is connected.
153 *
154 * @param[in] name will point to a string with the device name
155 *            of the serial port with the mouse connected.
156 * @param[in] type will point to a string with the type of mouse connected.
157 *
158 * @retval This method returns true on success and false on error.
159 */
160bool bsp_get_serial_mouse_device(
161  const char **name,
162  const char **type
163);
164
165#ifdef __cplusplus
166}
167#endif
168/**@}*/
169#endif  /* __tty_drv__  */
Note: See TracBrowser for help on using the repository browser.