ioctl.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef __IOCTL_H__
  2. #define __IOCTL_H__
  3. /******************************************************************************
  4. * *
  5. * License Agreement *
  6. * *
  7. * Copyright (c) 2004 Altera Corporation, San Jose, California, USA. *
  8. * All rights reserved. *
  9. * *
  10. * Permission is hereby granted, free of charge, to any person obtaining a *
  11. * copy of this software and associated documentation files (the "Software"), *
  12. * to deal in the Software without restriction, including without limitation *
  13. * the rights to use, copy, modify, merge, publish, distribute, sublicense, *
  14. * and/or sell copies of the Software, and to permit persons to whom the *
  15. * Software is furnished to do so, subject to the following conditions: *
  16. * *
  17. * The above copyright notice and this permission notice shall be included in *
  18. * all copies or substantial portions of the Software. *
  19. * *
  20. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
  21. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
  22. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
  23. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
  24. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
  25. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *
  26. * DEALINGS IN THE SOFTWARE. *
  27. * *
  28. * This agreement shall be governed in all respects by the laws of the State *
  29. * of California and by the laws of the United States of America. *
  30. * *
  31. * Altera does not recommend, suggest or require that this reference design *
  32. * file be used in conjunction or combination with any other product. *
  33. ******************************************************************************/
  34. /******************************************************************************
  35. * *
  36. * THIS IS A LIBRARY READ-ONLY SOURCE FILE. DO NOT EDIT. *
  37. * *
  38. ******************************************************************************/
  39. #ifdef __cplusplus
  40. extern "C"
  41. {
  42. #endif /* __cplusplus */
  43. /*
  44. * The ioctl() system call be used to initiate a variety of control operations
  45. * on a file descriptor. For the most part this simply translates to a call to
  46. * the ioctl() function of the associated device driver (TIOCEXCL and
  47. * TIOCNXCL are notable exceptions - see ioctl.c for details).
  48. *
  49. * The interpretation of the ioctl requests are therefore device specific.
  50. *
  51. * This function is equivalent to the standard Posix ioctl() call.
  52. */
  53. extern int ioctl (int fd, int req, void* arg);
  54. /*
  55. * list of ioctl calls handled by the system ioctl implementation.
  56. */
  57. #define TIOCEXCL 0x740d /* exclusive use of the device */
  58. #define TIOCNXCL 0x740e /* allow multiple use of the device */
  59. /*
  60. * ioctl calls which can be handled by device drivers.
  61. */
  62. #define TIOCOUTQ 0x7472 /* get output queue size */
  63. #define TIOCMGET 0x741d /* get termios flags */
  64. #define TIOCMSET 0x741a /* set termios flags */
  65. /*
  66. * ioctl calls specific to JTAG UART.
  67. */
  68. #define TIOCSTIMEOUT 0x6a01 /* Set Timeout before assuming no host present */
  69. #define TIOCGCONNECTED 0x6a02 /* Get indication of whether host is connected */
  70. /*
  71. *
  72. */
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif /* __IOCTL_H__ */