![]() |
|
|||
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 void termios_test_driver_set_rx( 0041 const void *p, 0042 size_t len 0043 ); 0044 0045 void termios_test_driver_set_rx_enqueue_now( 0046 bool value 0047 ); 0048 0049 void termios_test_driver_dump_tx(const char *c); 0050 0051 /** 0052 * This macro defines the standard name for the Termios Test device 0053 * that is available to applications. 0054 */ 0055 #define TERMIOS_TEST_DRIVER_DEVICE_NAME "/dev/test" 0056 0057 /** 0058 * This macro defines the standard device driver table entry for 0059 * a Termios Test device driver. 0060 */ 0061 #define TERMIOS_TEST_DRIVER_TABLE_ENTRY \ 0062 { termios_test_driver_initialize, termios_test_driver_open, \ 0063 termios_test_driver_close, termios_test_driver_read, \ 0064 termios_test_driver_write, termios_test_driver_control } 0065 0066 /** 0067 * @brief Console Initialization Entry Point 0068 * 0069 * This method initializes the Termios Test device driver. 0070 * 0071 * @param[in] major is the device driver major number 0072 * @param[in] minor is the device driver minor number 0073 * @param[in] arg is the parameters to this call 0074 * 0075 * @return This method returns RTEMS_SUCCESSFUL when 0076 * the device driver is successfully initialized. 0077 */ 0078 rtems_device_driver termios_test_driver_initialize( 0079 rtems_device_major_number major, 0080 rtems_device_minor_number minor, 0081 void *arg 0082 ); 0083 0084 /** 0085 * @brief Console Open Entry Point 0086 * 0087 * This method opens a specific device supported by the 0088 * Termios Test device driver. 0089 * 0090 * @param[in] major is the device driver major number 0091 * @param[in] minor is the device driver minor number 0092 * @param[in] arg is the parameters to this call 0093 * 0094 * @return This method returns RTEMS_SUCCESSFUL when 0095 * the device driver is successfully opened. 0096 */ 0097 rtems_device_driver termios_test_driver_open( 0098 rtems_device_major_number major, 0099 rtems_device_minor_number minor, 0100 void *arg 0101 ); 0102 0103 /** 0104 * @brief Console Close Entry Point 0105 * 0106 * This method closes a specific device supported by the 0107 * Termios Test device driver. 0108 * 0109 * @param[in] major is the device driver major number 0110 * @param[in] minor is the device driver minor number 0111 * @param[in] arg is the parameters to this call 0112 * 0113 * @return This method returns RTEMS_SUCCESSFUL when 0114 * the device is successfully closed. 0115 */ 0116 rtems_device_driver termios_test_driver_close( 0117 rtems_device_major_number major, 0118 rtems_device_minor_number minor, 0119 void *arg 0120 ); 0121 0122 /** 0123 * @brief Console Read Entry Point 0124 * 0125 * This method reads from a specific device supported by the 0126 * Termios Test device driver. 0127 * 0128 * @param[in] major is the device driver major number 0129 * @param[in] minor is the device driver minor number 0130 * @param[in] arg is the parameters to this call 0131 * 0132 * @return This method returns RTEMS_SUCCESSFUL when 0133 * the device is successfully read from. 0134 */ 0135 rtems_device_driver termios_test_driver_read( 0136 rtems_device_major_number major, 0137 rtems_device_minor_number minor, 0138 void *arg 0139 ); 0140 0141 /** 0142 * @brief Console Write Entry Point 0143 * 0144 * This method writes to a specific device supported by the 0145 * Termios Test device driver. 0146 * 0147 * @param[in] major is the device driver major number 0148 * @param[in] minor is the device driver minor number 0149 * @param[in] arg is the parameters to this call 0150 * 0151 * @return This method returns RTEMS_SUCCESSFUL when 0152 * the device is successfully written. 0153 */ 0154 rtems_device_driver termios_test_driver_write( 0155 rtems_device_major_number major, 0156 rtems_device_minor_number minor, 0157 void *arg 0158 ); 0159 0160 /** 0161 * @brief Console IO Control Entry Point 0162 * 0163 * This method performs an IO Control operation on a 0164 * specific device supported by the Termios Test device driver. 0165 * 0166 * @param[in] major is the device driver major number 0167 * @param[in] minor is the device driver minor number 0168 * @param[in] arg is the parameters to this call 0169 * 0170 * @return This method returns RTEMS_SUCCESSFUL when 0171 * the device driver IO control operation is 0172 * successfully performed. 0173 */ 0174 rtems_device_driver termios_test_driver_control( 0175 rtems_device_major_number major, 0176 rtems_device_minor_number minor, 0177 void *arg 0178 ); 0179 0180 #ifdef __cplusplus 0181 } 0182 #endif 0183 0184 #endif 0185 /* 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 |
![]() ![]() |