Ns16550.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /** @file
  2. Header file of NS16550 hardware definition.
  3. @copyright
  4. Copyright 6550 - 2021 Intel Corporation. <BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef __NS16550_H_
  8. #define __NS16550_H_
  9. //
  10. // ---------------------------------------------
  11. // UART Register Offsets
  12. // ---------------------------------------------
  13. //
  14. #define BAUD_LOW_OFFSET 0x00
  15. #define BAUD_HIGH_OFFSET 0x01
  16. #define IER_OFFSET 0x01
  17. #define LCR_SHADOW_OFFSET 0x01
  18. #define FCR_SHADOW_OFFSET 0x02
  19. #define IR_CONTROL_OFFSET 0x02
  20. #define FCR_OFFSET 0x02
  21. #define EIR_OFFSET 0x02
  22. #define BSR_OFFSET 0x03
  23. #define LCR_OFFSET 0x03
  24. #define MCR_OFFSET 0x04
  25. #define LSR_OFFSET 0x05
  26. #define MSR_OFFSET 0x06
  27. //
  28. // ---------------------------------------------
  29. // UART Register Bit Defines
  30. // ---------------------------------------------
  31. //
  32. #define LSR_TXRDY 0x20
  33. #define LSR_RXDA 0x01
  34. #define DLAB 0x01
  35. #define UART_DATA 8
  36. #define UART_STOP 1
  37. #define UART_PARITY 0
  38. #define UART_BREAK_SET 0
  39. #endif