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

📄 oldlatches.c

📁 arm平台上的uclinux系统全部源代码
💻 C
字号:
/* Support for the latches on the old Archimedes which control the floppy, * hard disc and printer * * (c) David Alan Gilbert 1995/1996 */#include <linux/kernel.h>#include <asm/io.h>#include <asm/hardware.h>#ifdef LATCHAADDR/* * They are static so that everyone who accesses them has to go through here */static unsigned char LatchACopy;/* newval=(oldval & ~mask)|newdata */void oldlatch_aupdate(unsigned char mask,unsigned char newdata){    LatchACopy=(LatchACopy & ~mask)|newdata;    outb(LatchACopy, LATCHAADDR);#ifdef DEBUG    printk("oldlatch_A:0x%2x\n",LatchACopy);#endif}#endif#ifdef LATCHBADDRstatic unsigned char LatchBCopy;/* newval=(oldval & ~mask)|newdata */void oldlatch_bupdate(unsigned char mask,unsigned char newdata){    LatchBCopy=(LatchBCopy & ~mask)|newdata;    outb(LatchBCopy, LATCHBADDR);#ifdef DEBUG    printk("oldlatch_B:0x%2x\n",LatchBCopy);#endif}#endifvoid oldlatch_init(void){    printk("oldlatch: init\n");#ifdef LATCHAADDR    oldlatch_aupdate(0xff,0xff);#endif#ifdef LATCHBADDR    oldlatch_bupdate(0xff,0x8); /* Thats no FDC reset...*/#endif    return ;}

⌨️ 快捷键说明

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