brates.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /****************************************************************************
  2. ******* *******
  3. ******* BRATES.H *******
  4. ******* *******
  5. ****************************************************************************
  6. Author : Jeremy Rolls
  7. Date : 1 Nov 1990
  8. *
  9. * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. Version : 0.01
  25. Mods
  26. ----------------------------------------------------------------------------
  27. Date By Description
  28. ----------------------------------------------------------------------------
  29. ***************************************************************************/
  30. #ifndef _brates_h
  31. #ifndef lint
  32. /* static char * _brates_h_sccs = "@(#)brates.h 1.4"; */
  33. #endif
  34. #define _brates_h 1
  35. /* List of baud rate defines. Most are borrowed from /usr/include/sys/termio.h
  36. */
  37. #ifndef INKERNEL
  38. #define B0 0x00
  39. #define B50 0x01
  40. #define B75 0x02
  41. #define B110 0x03
  42. #define B134 0x04
  43. #define B150 0x05
  44. #define B200 0x06
  45. #define B300 0x07
  46. #define B600 0x08
  47. #define B1200 0x09
  48. #define B1800 0x0a
  49. #define B2400 0x0b
  50. #define B4800 0x0c
  51. #define B9600 0x0d
  52. #define B19200 0x0e
  53. #define B38400 0x0f
  54. #endif
  55. /*
  56. ** The following baudrates may or may not be defined
  57. ** on various UNIX systems.
  58. ** If they are not then we define them.
  59. ** If they are then we do not define them ;-)
  60. **
  61. ** This is appalling that we use same definitions as UNIX
  62. ** for our own download code as there is no garuntee that
  63. ** B57600 will be defined as 0x11 by a UNIX system....
  64. ** Arghhhhh!!!!!!!!!!!!!!
  65. */
  66. #if !defined(B56000)
  67. #define B56000 0x10
  68. #endif
  69. #if !defined(B57600)
  70. #define B57600 0x11
  71. #endif
  72. #if !defined(B64000)
  73. #define B64000 0x12
  74. #endif
  75. #if !defined(B115200)
  76. #define B115200 0x13
  77. #endif
  78. #if !defined(B2000)
  79. #define B2000 0x14
  80. #endif
  81. #define MAX_RATE B2000
  82. struct baud_rate /* Tag for baud rates */
  83. {
  84. /* short host_rate,*/ /* As passed by the driver */
  85. short divisor, /* The divisor */
  86. prescaler; /* The pre-scaler */
  87. };
  88. #endif