Examples of SMBusControler


Examples of org.jnode.driver.bus.smbus.SMBusControler

        new SMBusCommand().execute(args);
    }
   
    @Override
    public void execute() {
        SMBusControler smbusctrl = null;
        PrintWriter out = getOutput().getPrintWriter();
        try {
            smbusctrl = InitialNaming.lookup(SMBusControler.NAME);
        } catch (NameNotFoundException ex) {
            out.println("Could not find the SMBusControler: " + ex.getMessage());
            exit(1);
        }

        for (byte i = 0; i < 8; i++) {
            try {
                // TODO - can someone explain why we are shifting and ORing?  It looks like a bug to me.
                byte res = smbusctrl.readByte((byte) (0xa0 | (i << 1)), (byte) 2);
                out.println("DIMM " + i + " : type = " + Integer.toHexString(res));
            } catch (IOException ex) {
                out.println("DIMM " + i + " : not present");
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.