📄 pnp.java
字号:
/*
* $Id: PnP.java,v 1.1 2003/11/25 11:42:32 epr Exp $
*/
package org.jnode.driver.pnp;
import java.util.Hashtable;
/**
* PnP.
*
* <p>
* Title:
* </p>
* <p>
* Description:
* </p>
* The list is taken from Linux sources
* <p>
* Licence: GNU LGPL
* </p>
* <p>
* </p>
*
* @author Francois-Frederic Ozog
* @version 1.0
*/
public class PnP {
static Hashtable pnpDB = null;
static char[] AcpiGbl_HexToAscii = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
private static char AcpiUtHexToAsciiChar(int value, int position) {
return (AcpiGbl_HexToAscii[(value >> position) & 0xF]);
}
private static int AcpiUtDwordByteSwap(int id) {
int eisaId = (id & 0xFF) << 24;
eisaId |= (id & 0xFF00) << 8;
eisaId |= (id & 0xFF0000) >> 8;
eisaId |= (id & 0xFF000000) >> 24;
return eisaId;
}
public static String eisaIdToString(int id) {
String result = "";
int eisaId = AcpiUtDwordByteSwap(id);
result += (char) ('@' + ((eisaId >> 26) & 0x1f));
result += (char) ('@' + ((eisaId >> 21) & 0x1f));
result += (char) ('@' + ((eisaId >> 16) & 0x1f));
result += AcpiUtHexToAsciiChar(eisaId, 12);
result += AcpiUtHexToAsciiChar(eisaId, 8);
result += AcpiUtHexToAsciiChar(eisaId, 4);
result += AcpiUtHexToAsciiChar(eisaId, 0);
return result;
}
public static String getDescription(String pnpid) {
if (pnpDB == null) {
pnpDB = new Hashtable();
initDB();
}
String result = (String) pnpDB.get(pnpid.toUpperCase());
if (result == null)
result = pnpid;
return result;
}
private static void put(String id, String description) {
pnpDB.put(id.toUpperCase(), description);
}
private static void initDB() {
put("CSC0000", "Crystal Semiconductor CS423x sound -- SB/WSS/OPL3 emulation");
put("CSC0010", "Crystal Semiconductor CS423x sound -- control");
put("CSC0001", "Crystal Semiconductor CS423x sound -- joystick");
put("CSC0003", "Crystal Semiconductor CS423x sound -- MPU401");
put("IBM3780", "IBM pointing device");
put("IBM0071", "IBM infrared communications device");
put("IBM3760", "IBM DSP");
put("NSC6001", "National Semiconductor Serial Port with Fast IR");
put("PNP0000", "AT Interrupt Controller");
put("PNP0001", "EISA Interrupt Controller");
put("PNP0002", "MCA Interrupt Controller");
put("PNP0003", "APIC");
put("PNP0004", "Cyrix SLiC MP Interrupt Controller");
put("PNP0100", "AT Timer");
put("PNP0101", "EISA Timer");
put("PNP0102", "MCA Timer");
put("PNP0200", "AT DMA Controller");
put("PNP0201", "EISA DMA Controller");
put("PNP0202", "MCA DMA Controller");
put("PNP0300", "IBM PC/XT keyboard controller (83-key)");
put("PNP0301", "IBM PC/AT keyboard controller (86-key)");
put("PNP0302", "IBM PC/XT keyboard controller (84-key)");
put("PNP0303", "IBM Enhanced (101/102-key, PS/2 mouse support)");
put("PNP0304", "Olivetti Keyboard (83-key)");
put("PNP0305", "Olivetti Keyboard (102-key)");
put("PNP0306", "Olivetti Keyboard (86-key)");
put("PNP0307", "Microsoft Windows(R) Keyboard");
put("PNP0308", "General Input Device Emulation Interface (GIDEI) legacy");
put("PNP0309", "Olivetti Keyboard (A101/102 key)");
put("PNP030a", "AT&T 302 Keyboard");
put("PNP0320", "Japanese 106-key keyboard A01");
put("PNP0321", "Japanese 101-key keyboard");
put("PNP0322", "Japanese AX keyboard");
put("PNP0323", "Japanese 106-key keyboard 002/003");
put("PNP0324", "Japanese 106-key keyboard 001");
put("PNP0325", "Japanese Toshiba Desktop keyboard");
put("PNP0326", "Japanese Toshiba Laptop keyboard");
put("PNP0327", "Japanese Toshiba Notebook keyboard");
put("PNP0340", "Korean 84-key keyboard");
put("PNP0341", "Korean 86-key keyboard");
put("PNP0342", "Korean Enhanced keyboard");
put("PNP0343", "Korean Enhanced keyboard 101b");
put("PNP0343", "Korean Enhanced keyboard 101c");
put("PNP0344", "Korean Enhanced keyboard 103");
put("PNP0400", "Standard LPT printer port");
put("PNP0401", "ECP printer port");
put("PNP0500", "Standard PC COM port");
put("PNP0501", "16550A-compatible COM port");
put("PNP0502", "Multiport serial device (non-intelligent 16550)");
put("PNP0510", "Generic IRDA-compatible device");
put("PNP0511", "Generic IRDA-compatible device");
put("PNP0600", "Generic ESDI/IDE/ATA compatible hard disk controller");
put("PNP0601", "Plus Hardcard II");
put("PNP0602", "Plus Hardcard IIXL/EZ");
put("PNP0603", "Generic IDE supporting Microsoft Device Bay Specification");
put("PNP0700", "PC standard floppy disk controller");
put("PNP0701", "Standard floppy controller supporting MS Device Bay Spec");
put("PNP0802", "Microsoft Sound System or Compatible Device (obsolete)");
put("PNP0900", "VGA Compatible");
put("PNP0901", "Video Seven VRAM/VRAM II/1024i");
put("PNP0902", "8514/A Compatible");
put("PNP0903", "Trident VGA");
put("PNP0904", "Cirrus Logic Laptop VGA");
put("PNP0905", "Cirrus Logic VGA");
put("PNP0906", "Tseng ET4000");
put("PNP0907", "Western Digital VGA");
put("PNP0908", "Western Digital Laptop VGA");
put("PNP0909", "S3 Inc. 911/924");
put("PNP090a", "ATI Ultra Pro/Plus (Mach 32)");
put("PNP090b", "ATI Ultra (Mach 8)");
put("PNP090c", "XGA Compatible");
put("PNP090d", "ATI VGA Wonder");
put("PNP090e", "Weitek P9000 Graphics Adapter");
put("PNP090f", "Oak Technology VGA");
put("PNP0910", "Compaq QVision");
put("PNP0911", "XGA/2");
put("PNP0912", "Tseng Labs W32/W32i/W32p");
put("PNP0913", "S3 Inc. 801/928/964");
put("PNP0914", "Cirrus Logic 5429/5434 (memory mapped)");
put("PNP0915", "Compaq Advanced VGA (AVGA)");
put("PNP0916", "ATI Ultra Pro Turbo (Mach64)");
put("PNP0917", "Reserved by Microsoft");
put("PNP0918", "Matrox MGA");
put("PNP0919", "Compaq QVision 2000");
put("PNP091a", "Tseng W128");
put("PNP0930", "Chips & Technologies Super VGA");
put("PNP0931", "Chips & Technologies Accelerator");
put("PNP0940", "NCR 77c22e Super VGA");
put("PNP0941", "NCR 77c32blt");
put("PNP09ff", "Plug and Play Monitors (VESA DDC)");
put("PNP0A00", "ISA Bus");
put("PNP0A01", "EISA Bus");
put("PNP0A02", "MCA Bus");
put("PNP0A03", "PCI Bus");
put("PNP0A04", "VESA/VL Bus");
put("PNP0A05", "Generic ACPI Bus");
put("PNP0A06", "Generic ACPI Extended-IO Bus (EIO bus)");
put("PNP0800", "AT-style speaker sound");
put("PNP0A00", "AT Real-Time Clock");
put("PNP0B00", "Real-Time Clock");
put("PNP0C00", "Plug and Play BIOS (only created by the root enumerator)");
put("PNP0C01", "System Board");
put("PNP0C02", "Reserved Motherboard Resources");
put("PNP0C03", "Plug and Play BIOS Event Notification Interrupt");
put("PNP0C04", "Math Coprocessor");
put("PNP0C05", "APM BIOS (Version independent)");
put("PNP0C06", "Reserved for identification of early Plug and Play BIOS implementation.");
put("PNP0C07", "Reserved for identification of early Plug and Play BIOS implementation.");
put("PNP0C08", "ACPI system board hardware");
put("PNP0C09", "ACPI Embedded Controller");
put("PNP0C0A", "ACPI Control Method Battery");
put("PNP0C0B", "ACPI Fan");
put("PNP0C0C", "ACPI power button device");
put("PNP0C0D", "ACPI lid device");
put("PNP0C0E", "ACPI sleep button device");
put("PNP0C0F", "PCI interrupt link device");
put("PNP0C10", "ACPI system indicator device");
put("PNP0C11", "ACPI thermal zone");
put("PNP0C12", "Device Bay Controller");
put("PNP0C13", "Plug and Play BIOS (used when ACPI mode cannot be used)");
put("PNP0C15", "Docking Station");
put("PNP0E00", "Intel 82365-Compatible PCMCIA Controller");
put("PNP0E01", "Cirrus Logic CL-PD6720 PCMCIA Controller");
put("PNP0E02", "VLSI VL82C146 PCMCIA Controller");
put("PNP0E03", "Intel 82365-compatible CardBus controller");
put("PNP0F00", "Microsoft Bus Mouse");
put("PNP0F01", "Microsoft Serial Mouse");
put("PNP0F02", "Microsoft InPort Mouse");
put("PNP0F03", "Microsoft PS/2-style Mouse");
put("PNP0F04", "Mouse Systems Mouse");
put("PNP0F05", "Mouse Systems 3-Button Mouse (COM2)");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -