⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winbond.h

📁 文件内包含了nuclues的内核代码和针对Power PC的编译器。需要用VirtNet生成一个虚拟网卡才可使用
💻 H
字号:
/************************************************************************/
/*                                                                      */
/*       Copyright (c) 2001 by Accelerated Technology, Inc.             */
/*                                                                      */
/*  PROPRIETARY RIGHTS of Accelerated Technology are  involved in       */
/*  the subject matter of this material.  All manufacturing,            */
/*  reproduction, use, and sales rights pertaining to this subject      */
/*  matter are  governed by the license agreement.  The recipient of    */
/*     this software implicitly accepts the terms of the license.       */
/*                                                                      */
/*                                                                      */
/************************************************************************/
/************************************************************************/
/* FILE NAME                              VERSION                       */
/*                                                                      */
/*        winbond.h              Nucleus PLUS\MPC8245\Diab C/C++ 1.13.1 */
/*                                                                      */
/*                                                                      */
/* DESCRIPTION                                                          */
/*                                                                      */
/*        Support services for the Winbond W83C553F System I/O          */
/*        controller with PCI Arbiter.                                  */
/*                                                                      */
/*                                                                      */
/* DATA STRUCTURES                                                      */
/*                                                                      */
/*        none                                                          */
/*                                                                      */
/* FUNCTIONS                                                            */
/*                                                                      */
/*        wb_Init                                                       */
/*                                                                      */
/* DEPENDENCIES                                                         */
/*        NA                                                            */
/*                                                                      */
/* HISTORY                                                              */
/*                                                                      */
/*        NAME              DATE                   REMARKS              */
/*                                                                      */
/*      T. Weller        12\19\2001       Created inital version 1.13.1 */ 
/************************************************************************/
#ifndef WINBOND_H
#define WINBOND_H

#include "nucleus.h"


STATUS WB_Init();

#define IO_Base       0xFE000000

#define PIC1_ICW1         0x20      /* Initialization write only */
#define PIC1_ICW2         0x21      /* Initialization write only */
#define PIC1_ICW3         0x21      /* Initialization write only (master) */
#define PIC1_ICW4         0x21      /* Initialization write only  */
#define PIC1_OCW1         0x21      /* Operation */
#define PIC1_OCW2         0x20      /* Operation write only */
#define PIC1_OCW3         0x20      /* Operation */

#define PIC2_ICW1         0xA0
#define PIC2_ICW2         0xA1
#define PIC2_ICW3         0xA1
#define PIC2_ICW4         0xA1  
#define PIC2_OCW1         0xA1
#define PIC2_OCW2         0xA0
#define PIC2_OCW3         0xA0

#define PIC1_INT_CONTROL  0x04D0    /* Interrupt level/edge control register */
#define PIC2_INT_CONTROL  0x04D1    /* Interrupt level/edge control register */




/* Deifine IO macros. */

/* 8 bit access */
#define WB_OUTBYTE(reg, data)   ( (*( (CHAR *) (reg) ) ) = (data) )
#define WB_INBYTE(reg)          (  *( (CHAR *) (reg) ) )

/* 16 bit access */
#define WB_OUTWORD(reg, data)   ( (*( (unsigned short *) (reg) ) ) = (data) )
#define WB_INWORD(reg)          (  *( (unsigned short *) (reg) ) )

/* 32 bit access */
#define WB_OUTDWORD(reg, data)  ( (*( (UNSIGNED *) (reg) ) ) = (data) )
#define WB_INDWORD(reg)         (  *( (UNSIGNED *) (reg) ) )

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -