?? pl010ser.h
字號:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// Internal AMBA UART register mappings.
//
typedef struct _AMBA_UART_INFO_
{
volatile PUCHAR pUART_DR; // Data read or written from interface.
volatile PUCHAR pUART_RSR; // Receive status (r).
volatile PUCHAR pUART_ECR; // Error clear (w).
volatile PUCHAR pUART_LCR_H; // Line control registery (high byte).
volatile PUCHAR pUART_LCR_M; // Line control registery (middle byte).
volatile PUCHAR pUART_LCR_L; // Line control registery (low byte).
volatile PUCHAR pUART_CR; // Control register.
volatile PUCHAR pUART_FR; // Flag register (ro).
volatile PUCHAR pUART_IIR; // Interrupt ID (r).
volatile PUCHAR pUART_ICR; // Interrupt clear (w).
volatile PUCHAR pUART_ILPR; // IrDA low-power counter.
volatile PUCHAR pSC_BASE; // System Controller Base.
volatile PULONG pSC_MCR;
UCHAR RSR;
UCHAR LCR_H;
UCHAR LCR_M;
UCHAR LCR_L;
UCHAR CR;
UCHAR FR;
UCHAR IIR;
} AMBA_UART_INFO, *PAMBA_UART_INFO;
/* -------------------------------------------------------------------------------
* From AMBA UART (PL010) Block Specification (ARM-0001-CUST-DSPC-A03)
* -------------------------------------------------------------------------------
* UART Register Offsets.
*
*/
#define AMBA_UARTDR 0x00 /* Data read or written from the interface. */
#define AMBA_UARTRSR 0x04 /* Receive status register (Read). */
#define AMBA_UARTECR 0x04 /* Error clear register (Write). */
#define AMBA_UARTLCR_H 0x08 /* Line control register, high byte. */
#define AMBA_UARTLCR_M 0x0C /* Line control register, middle byte. */
#define AMBA_UARTLCR_L 0x10 /* Line control register, low byte. */
#define AMBA_UARTCR 0x14 /* Control register. */
#define AMBA_UARTFR 0x18 /* Flag register (Read only). */
#define AMBA_UARTIIR 0x1C /* Interrupt indentification register (Read). */
#define AMBA_UARTICR 0x1C /* Interrupt clear register (Write). */
#define AMBA_UARTILPR 0x20 /* IrDA low power counter register. */
#define AMBA_UARTRSR_OE 0x08
#define AMBA_UARTRSR_BE 0x04
#define AMBA_UARTRSR_PE 0x02
#define AMBA_UARTRSR_FE 0x01
#define AMBA_UARTFR_TXFE 0x80
#define AMBA_UARTFR_RXFF 0x40
#define AMBA_UARTFR_TXFF 0x20
#define AMBA_UARTFR_RXFE 0x10
#define AMBA_UARTFR_BUSY 0x08
#define AMBA_UARTFR_TMSK (AMBA_UARTFR_TXFF + AMBA_UARTFR_BUSY)
#define AMBA_UARTFR_DCD 0x04
#define AMBA_UARTFR_DSR 0x02
#define AMBA_UARTFR_CTS 0x01
#define AMBA_UARTCR_RTIE 0x40
#define AMBA_UARTCR_TIE 0x20
#define AMBA_UARTCR_RIE 0x10
#define AMBA_UARTCR_MSIE 0x08
#define AMBA_UARTCR_IIRLP 0x04
#define AMBA_UARTCR_SIREN 0x02
#define AMBA_UARTCR_UARTEN 0x01
#define AMBA_UARTLCR_H_WLEN_8 0x60
#define AMBA_UARTLCR_H_WLEN_7 0x40
#define AMBA_UARTLCR_H_WLEN_6 0x20
#define AMBA_UARTLCR_H_WLEN_5 0x00
#define AMBA_UARTLCR_H_FEN 0x10
#define AMBA_UARTLCR_H_STP2 0x08
#define AMBA_UARTLCR_H_EPS 0x04
#define AMBA_UARTLCR_H_PEN 0x02
#define AMBA_UARTLCR_H_BRK 0x01
#define AMBA_UARTIIR_RTIS 0x08
#define AMBA_UARTIIR_TIS 0x04
#define AMBA_UARTIIR_RIS 0x02
#define AMBA_UARTIIR_MIS 0x01
#define AMBA_UARTIIR_MASK 0x0F
#define AMBA_UART_BSIZE_MASK 0x9F
#define AMBA_UART_PARITY_MASK 0xF9
#define AMBA_UART_SBIT_MASK 0xF7
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -