![]() |
|
|||
File indexing completed on 2025-05-11 08:24:34
0001 /* SPDX-License-Identifier: BSD-2-Clause */ 0002 0003 /** 0004 * @file termios_testdriver.h 0005 */ 0006 0007 /* 0008 * COPYRIGHT (c) 1989-2009. 0009 * On-Line Applications Research Corporation (OAR). 0010 * 0011 * Redistribution and use in source and binary forms, with or without 0012 * modification, are permitted provided that the following conditions 0013 * are met: 0014 * 1. Redistributions of source code must retain the above copyright 0015 * notice, this list of conditions and the following disclaimer. 0016 * 2. Redistributions in binary form must reproduce the above copyright 0017 * notice, this list of conditions and the following disclaimer in the 0018 * documentation and/or other materials provided with the distribution. 0019 * 0020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0021 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0022 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0023 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 0024 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0025 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0026 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0027 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0028 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0029 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0030 * POSSIBILITY OF SUCH DAMAGE. 0031 */ 0032 0033 #ifndef _TERMIOS_TESTDRIVER_H 0034 #define _TERMIOS_TESTDRIVER_H 0035 0036 #ifdef __cplusplus 0037 extern "C" { 0038 #endif 0039 0040 /** 0041 * This macro defines the standard name for the Termios Test device 0042 * that is available to applications. 0043 */ 0044 #define TERMIOS_TEST_DRIVER_DEVICE_NAME "/dev/test" 0045 0046 /** 0047 * This macro defines the standard device driver table entry for 0048 * a Termios Test device driver. 0049 */ 0050 #define TERMIOS_TEST_DRIVER_TABLE_ENTRY \ 0051 { termios_test_driver_initialize, termios_test_driver_open, \ 0052 termios_test_driver_close, termios_test_driver_read, \ 0053 termios_test_driver_write, termios_test_driver_control } 0054 0055 /** 0056 * @brief Console Initialization Entry Point 0057 * 0058 * This method initializes the Termios Test device driver. 0059 * 0060 * @param[in] major is the device driver major number 0061 * @param[in] minor is the device driver minor number 0062 * @param[in] arg is the parameters to this call 0063 * 0064 * @return This method returns RTEMS_SUCCESSFUL when 0065 * the device driver is successfully initialized. 0066 */ 0067 rtems_device_driver termios_test_driver_initialize( 0068 rtems_device_major_number major, 0069 rtems_device_minor_number minor, 0070 void *arg 0071 ); 0072 0073 /** 0074 * @brief Console Open Entry Point 0075 * 0076 * This method opens a specific device supported by the 0077 * Termios Test device driver. 0078 * 0079 * @param[in] major is the device driver major number 0080 * @param[in] minor is the device driver minor number 0081 * @param[in] arg is the parameters to this call 0082 * 0083 * @return This method returns RTEMS_SUCCESSFUL when 0084 * the device driver is successfully opened. 0085 */ 0086 rtems_device_driver termios_test_driver_open( 0087 rtems_device_major_number major, 0088 rtems_device_minor_number minor, 0089 void *arg 0090 ); 0091 0092 /** 0093 * @brief Console Close Entry Point 0094 * 0095 * This method closes a specific device supported by the 0096 * Termios Test device driver. 0097 * 0098 * @param[in] major is the device driver major number 0099 * @param[in] minor is the device driver minor number 0100 * @param[in] arg is the parameters to this call 0101 * 0102 * @return This method returns RTEMS_SUCCESSFUL when 0103 * the device is successfully closed. 0104 */ 0105 rtems_device_driver termios_test_driver_close( 0106 rtems_device_major_number major, 0107 rtems_device_minor_number minor, 0108 void *arg 0109 ); 0110 0111 /** 0112 * @brief Console Read Entry Point 0113 * 0114 * This method reads from a specific device supported by the 0115 * Termios Test device driver. 0116 * 0117 * @param[in] major is the device driver major number 0118 * @param[in] minor is the device driver minor number 0119 * @param[in] arg is the parameters to this call 0120 * 0121 * @return This method returns RTEMS_SUCCESSFUL when 0122 * the device is successfully read from. 0123 */ 0124 rtems_device_driver termios_test_driver_read( 0125 rtems_device_major_number major, 0126 rtems_device_minor_number minor, 0127 void *arg 0128 ); 0129 0130 /** 0131 * @brief Console Write Entry Point 0132 * 0133 * This method writes to a specific device supported by the 0134 * Termios Test device driver. 0135 * 0136 * @param[in] major is the device driver major number 0137 * @param[in] minor is the device driver minor number 0138 * @param[in] arg is the parameters to this call 0139 * 0140 * @return This method returns RTEMS_SUCCESSFUL when 0141 * the device is successfully written. 0142 */ 0143 rtems_device_driver termios_test_driver_write( 0144 rtems_device_major_number major, 0145 rtems_device_minor_number minor, 0146 void *arg 0147 ); 0148 0149 /** 0150 * @brief Console IO Control Entry Point 0151 * 0152 * This method performs an IO Control operation on a 0153 * specific device supported by the Termios Test device driver. 0154 * 0155 * @param[in] major is the device driver major number 0156 * @param[in] minor is the device driver minor number 0157 * @param[in] arg is the parameters to this call 0158 * 0159 * @return This method returns RTEMS_SUCCESSFUL when 0160 * the device driver IO control operation is 0161 * successfully performed. 0162 */ 0163 rtems_device_driver termios_test_driver_control( 0164 rtems_device_major_number major, 0165 rtems_device_minor_number minor, 0166 void *arg 0167 ); 0168 0169 #ifdef __cplusplus 0170 } 0171 #endif 0172 0173 #endif 0174 /* end of include file */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |