altoona.h
来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C头文件 代码 · 共 122 行
H
122 行
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 1995-1998 Microsoft Corporation
Module Name:
katana.h
Abstract:
Definitions of Katana platform specific constants and functions
Author:
Jun Liu (junliu) 12-Nov-97
Notes:
--*/
#ifndef _katana_h_
#define _katana_h_
#include <oalintr.h>
#include <alt_def.h>
#ifndef CPU_CLOCK_FRQUENCY
#define CPU_CLOCK_FRQUENCY 200000000 /* Hz */
#endif
/*
**
** Kernel IoControl ID
**
*/
#define HAL_IOCTL_ENABLE_KERNEL_SERIAL 0x0006000
#define HAL_IOCTL_DISABLE_KERNEL_SERIAL 0x0007000
#define HAL_IOCTL_ALTOONA_RESET 0x8888888
/*
**
** Common addresses
**
*/
#define PHYS_ADDR_RAM_BASE MEMORY_BASE
#define PHYS_ADDR_PCI_MEM_BASE PCI_MEMORY_BASE
#define PHYS_ADDR_PCI_CFG_BASE PCI_CONFIG_BASE
#define PHYS_ADDR_INT_ACK_BASE PCI_INTACK_BASE
#define PHYS_ADDR_IO_SPACE_BASE PCI_IO_BASE
#define IOBASE_DMA1 0x00 // 0x00 - 0x0F
#define IOBASE_PIC1 0x20 // 0x20 - 0x21
#define IOBASE_RTC 0x40 // 0x40 - 0x43
#define IOBASE_KEYBOARD 0x60 // 0x60 - 0x64
#define IOBASE_PIC2 0xA0 // 0xA0 - 0xA1
#ifndef ASSEMBLY_LANGUAGE
/*
**
** kernel mode serial driver
**
*/
#define KERNEL_BUFFER_SIZE 0x100 // buffer size must be power of 2
typedef struct _KERNEL_SERIAL_INFO {
ULONG Enable; // kernel buffers enabled
ULONG InterruptId; // interrupt ID
ULONG BufferSize; // requested/allocated size of buffer
ULONG RxThreshold; // number of bytes in buffer before signaling IST
ULONG WriteIndex; // index into buffer for ISR to write
ULONG ReadIndex; // index into buffer for IST to read from
ULONG IIRValue; // IIR value read at kernel interrupt time
PUCHAR SerialPort; // base address of uart
UCHAR RxBuffer[KERNEL_BUFFER_SIZE]; // start circular receive buffer
UCHAR RxStatus[KERNEL_BUFFER_SIZE]; // line status for each RX character
} KERNEL_SERIAL_INFO, *PKERNEL_SERIAL_INFO;
/*
** Function to enable the Kernels Serial receive buffers
*/
BOOL __inline EnableSerialRxBuffer(PKERNEL_SERIAL_INFO pSerialInfo, PKERNEL_SERIAL_INFO *pKernelSerialInfo)
{
return KernelIoControl(HAL_IOCTL_ENABLE_KERNEL_SERIAL,
pSerialInfo,
sizeof(KERNEL_SERIAL_INFO),
pKernelSerialInfo,
sizeof(PKERNEL_SERIAL_INFO),
NULL);
};
/*
** Function to disable the Kernels Serial receive buffers
*/
BOOL __inline DisableSerialRxBuffer(DWORD dwIntID)
{
return KernelIoControl(HAL_IOCTL_DISABLE_KERNEL_SERIAL,
&dwIntID,
sizeof(DWORD),
NULL,
0,
NULL);
};
#endif /* End of ASSEMBLY_LANGUAGE */
#endif /* End of _katana_h_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?