serial_reg.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  *  linux/include/asm-arm/arch-anakin/serial_reg.h
  3.  *
  4.  *  Copyright (C) 2001 Aleph One Ltd. for Acunia N.V.
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License version 2 as
  8.  * published by the Free Software Foundation.
  9.  *
  10.  *  Changelog:
  11.  *   09-Apr-2001 TTC Created
  12.  */
  13. #ifndef ASM_ARCH_SERIAL_REG_H
  14. #define ASM_ARCH_SERIAL_REG_H
  15. /*
  16.  * Serial registers (other than tx/rx)
  17.  */
  18. /*
  19.  * [UARTx + 0x10]
  20.  */
  21. #define RXRELEASE (1 << 0)
  22. #define TXEMPTY (1 << 1)
  23. #define CTS (1 << 2)
  24. #define PRESCALER (31 << 3)
  25. #define SETBAUD(baud) ((230400 / (baud) - 1) << 3)
  26. #define GETBAUD(prescaler) (230400 / (((prescaler) >> 3) + 1))
  27. /*
  28.  * [UARTx + 0x18]
  29.  */
  30. #define IRQENABLE (1 << 0)
  31. #define SENDREQUEST (1 << 1)
  32. #define RTS (1 << 2)
  33. #define DTR (1 << 3)
  34. #define DCD (1 << 4)
  35. #define BLOCKRX (1 << 5)
  36. #define PARITY (3 << 6)
  37. #define SETPARITY(parity) ((parity) << 6)
  38. #define GETPARITY(parity) ((parity) >> 6)
  39. #define NONEPARITY              (0)
  40. #define ODDPARITY               (1)
  41. #define EVENPARITY              (2)
  42. /*
  43.  * [UARTx + 0x1c]
  44.  */
  45. #define TX (1 << 0)
  46. #define RX (1 << 1)
  47. #define OVERRUN (1 << 2)
  48. /*
  49.  * [UARTx + 0x20]
  50.  */
  51. #define SETBREAK (1 << 0)
  52. /*
  53.  * Software interrupt register
  54.  */
  55. #define TXENABLE (1 << 0)
  56. #endif