![]() |
|
|||
File indexing completed on 2025-05-11 08:24:14
0001 /* SPDX-License-Identifier: BSD-2-Clause */ 0002 0003 /** 0004 * @file 0005 * 0006 * @brief Serial Mouse Driver 0007 * 0008 * This file describes the Serial Mouse Driver for all boards. 0009 * This driver assumes that the BSP or application will provide 0010 * an implementation of the method bsp_get_serial_mouse_device() 0011 * which tells the driver what serial port device to open() and 0012 * what type of mouse is connected. 0013 * 0014 * This driver relies on the Mouse Parser Engine. 0015 */ 0016 0017 /* 0018 * COPYRIGHT (c) 1989-2011. 0019 * On-Line Applications Research Corporation (OAR). 0020 * 0021 * Redistribution and use in source and binary forms, with or without 0022 * modification, are permitted provided that the following conditions 0023 * are met: 0024 * 1. Redistributions of source code must retain the above copyright 0025 * notice, this list of conditions and the following disclaimer. 0026 * 2. Redistributions in binary form must reproduce the above copyright 0027 * notice, this list of conditions and the following disclaimer in the 0028 * documentation and/or other materials provided with the distribution. 0029 * 0030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0031 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0032 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0033 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 0034 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0035 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0036 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0037 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0038 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0039 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0040 * POSSIBILITY OF SUCH DAMAGE. 0041 */ 0042 0043 #ifndef __SERIAL_MOUSE_h__ 0044 #define __SERIAL_MOUSE_h__ 0045 0046 #include <rtems/io.h> 0047 0048 /* functions */ 0049 0050 /** 0051 * @defgroup libmisc_serialmouse Serial Mouse Driver 0052 * @ingroup libmisc_mouse 0053 */ 0054 /**@{*/ 0055 #ifdef __cplusplus 0056 extern "C" { 0057 #endif 0058 0059 /** 0060 * @brief Standard device file path for a PS2 mouse device. 0061 */ 0062 #define SERIAL_MOUSE_DEVICE_PS2 "/dev/psaux" 0063 0064 /** 0065 * This macro defines the serial mouse device driver entry points. 0066 */ 0067 #define SERIAL_MOUSE_DRIVER_TABLE_ENTRY \ 0068 { serial_mouse_initialize, serial_mouse_open, serial_mouse_close, \ 0069 serial_mouse_read, serial_mouse_write, serial_mouse_control } 0070 0071 /** 0072 * @brief The initialization of the serial mouse driver. 0073 * 0074 * This method initializes the serial mouse driver. 0075 * 0076 * @param[in] major is the mouse device major number 0077 * @param[in] minor is the mouse device minor number 0078 * @param[in] arg points to device driver arguments 0079 */ 0080 rtems_device_driver serial_mouse_initialize( 0081 rtems_device_major_number major, 0082 rtems_device_minor_number minor, 0083 void *arg 0084 ); 0085 0086 /** 0087 * @brief Open device driver entry point for the serial mouse driver. 0088 * 0089 * This method implements the Open device driver entry 0090 * point for the serial mouse driver. 0091 * 0092 * @param[in] major is the mouse device major number 0093 * @param[in] minor is the mouse device minor number 0094 * @param[in] arg points to device driver arguments 0095 */ 0096 rtems_device_driver serial_mouse_open( 0097 rtems_device_major_number major, 0098 rtems_device_minor_number minor, 0099 void *arg 0100 ); 0101 0102 /** 0103 * @brief Close device driver entry point for the serial mouse driver. 0104 * 0105 * This method implements the Close device driver entry 0106 * point for the serial mouse driver. 0107 * 0108 * @param[in] major is the mouse device major number 0109 * @param[in] minor is the mouse device minor number 0110 * @param[in] arg points to device driver arguments 0111 */ 0112 rtems_device_driver serial_mouse_close( 0113 rtems_device_major_number major, 0114 rtems_device_minor_number minor, 0115 void *arg 0116 ); 0117 0118 /** 0119 * @brief Read device driver entry point for the serial mouse driver. 0120 * 0121 * This method implements the Read device driver entry 0122 * point for the serial mouse driver. 0123 * 0124 * @param[in] major is the mouse device major number 0125 * @param[in] minor is the mouse device minor number 0126 * @param[in] arg points to device driver arguments 0127 */ 0128 rtems_device_driver serial_mouse_read( 0129 rtems_device_major_number major, 0130 rtems_device_minor_number minor, 0131 void *arg 0132 ); 0133 0134 /** 0135 * @brief Write device driver entry point for the serial mouse driver. 0136 * 0137 * This method implements the Write device driver entry 0138 * point for the serial mouse driver. 0139 * 0140 * @param[in] major is the mouse device major number 0141 * @param[in] minor is the mouse device minor number 0142 * @param[in] arg points to device driver arguments 0143 */ 0144 rtems_device_driver serial_mouse_write( 0145 rtems_device_major_number major, 0146 rtems_device_minor_number minor, 0147 void *arg 0148 ); 0149 0150 /** 0151 * @brief IO Control device driver entry point for the serial mouse driver. 0152 * 0153 * This method implements the IO Control device driver entry 0154 * point for the serial mouse driver. 0155 * 0156 * @param[in] major is the mouse device major number 0157 * @param[in] minor is the mouse device minor number 0158 * @param[in] arg points to device driver arguments 0159 */ 0160 rtems_device_driver serial_mouse_control( 0161 rtems_device_major_number major, 0162 rtems_device_minor_number minor, 0163 void *arg 0164 ); 0165 0166 /** 0167 * @brief Obtain serial mouse configuration information. 0168 * 0169 * This method is implemented by the BSP or application and 0170 * tells the driver what device to open() and what type of 0171 * mouse is connected. 0172 * 0173 * @param[in] name will point to a string with the device name 0174 * of the serial port with the mouse connected. 0175 * @param[in] type will point to a string with the type of mouse connected. 0176 * 0177 * @retval This method returns true on success and false on error. 0178 */ 0179 bool bsp_get_serial_mouse_device( 0180 const char **name, 0181 const char **type 0182 ); 0183 0184 #ifdef __cplusplus 0185 } 0186 #endif 0187 /**@}*/ 0188 #endif /* __tty_drv__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |