smbuscontroler.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 98 行

JAVA
98
字号
package org.jnode.driver.smbus;

import javax.naming.NamingException;

import org.jnode.naming.InitialNaming;

/**
 * SMBus controller.
 * 
 * <p>
 * Title: SMBus
 * </p>
 * <p>
 * Description:
 * </p>
 * The System Management Bus (SMBus) is a two-wire interface through which various system component
 * chips can communicate with each other and with the rest of the system. It is based on the
 * principles of . SMBus provides a control bus for system and power management related tasks. A
 * system may use SMBus to pass messages to and from devices instead of tripping individual control
 * lines. Removing the individual control lines reduces pin count. Accepting messages ensures
 * future expandability. With System Management Bus, a device can provide manufacturer information,
 * tell the system what its model/part number is, save its state for a suspend event, report
 * different types of errors, accept control parameters, and return its status.
 * <P>
 * The System Management Bus Specification refers to three types of devices. A slave is a device
 * that is receiving or responding to a command. A master is a device that issues commands,
 * generates the clocks, and terminates the transfer. A host is a specialized master that provides
 * the main interface to the system's CPU. A host must be a master-slave and must support the SMBus
 * host notify protocol. There may be at most one host in a system. One example of a hostless
 * system is a simple battery charging station. The station might sit plugged into a wall waiting
 * to charge a smart battery. A device may be designed so that it is never a master and always a
 * slave. A device may act as a slave most of the time, but in special instances it may become a
 * master. A device can also be designed to be a master only. A system host is an example of a
 * device that acts as a host most of the time but that includes some slave behavior..
 * <P>
 * Any device that exists on the System Management Bus as a slave has a unique address called the
 * Slave Address. For reference, the following addresses are reserved and must not be used by or
 * assigned to any SMBus slave device unless otherwise detailed by this specification.
 * <P>
 * Bits 7-1:Slave Address
 * <P>
 * Bit 0: R/W# bit
 * <P>
 * Addr RW Comment
 * <P>
 * 0000 000 0 General Call Address
 * <P>
 * 0000 000 1 START byte
 * <P>
 * 0000 001 X CBUS address
 * <P>
 * 0000 010 X Address reserved for different bus format
 * <P>
 * 0000 011 X Reserved for future use
 * <P>
 * 0000 1XX X Reserved for future use
 * <P>
 * 0101 000 X Reserved for ACCESS.bus host
 * <P>
 * 0110 111 X Reserved for ACCESS.bus default address
 * <P>
 * 1111 0XX X 10-bit slave addressing
 * <P>
 * 1111 1XX X Reserved for future use
 * <P>
 * 0001 000 X SMBus Host
 * <P>
 * 0001 100 X SMBus Alert Response Address
 * <P>
 * 1100 001 X SMBus Device Default Address
 * <P>
 * All other addresses are available for address assignment for dynamic address devices and/or for
 * miscellaneous devices. Miscellaneous device addresses are discussed in Section 5.2.1.4.
 * 
 * <p>
 * Licence: GNU LGPL
 * </p>
 * <p>
 * </p>
 * 
 * @author Francois-Frederic Ozog
 * @version 1.0
 */

public abstract class SMBusControler {

	public static final Class NAME = SMBusControler.class;//"system/smbus";

	public SMBusControler() {
		try {
			InitialNaming.bind(NAME, this);
		} catch (NamingException ex) {
			System.err.println("Cannot register Keyboard Interpreter name in InitialNaming namespace");
		}
	}

	/**
	 * Here, part of the slave address denotes the command 

⌨️ 快捷键说明

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