Package se.sics.mspsim.core

Examples of se.sics.mspsim.core.ADCInput


    public void setupNodePorts() {
        super.setupNodePorts();
        leds = new Leds(cpu, LEDS);
        accelerometer = new MMA7260QT(cpu);
        ADC12 adc = cpu.getIOUnit(ADC12.class, "ADC12");
        adc.setADCInput(4, new ADCInput() {
            public int nextData() {
                return accelerometer.getADCX();
            }
        });
        adc.setADCInput(5, new ADCInput() {
            public int nextData() {
                return accelerometer.getADCY();
            }
        });
        adc.setADCInput(6, new ADCInput() {
            public int nextData() {
                return accelerometer.getADCZ();
            }
        });
View Full Code Here

TOP

Related Classes of se.sics.mspsim.core.ADCInput

Copyright © 2018 www.massapicom. 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.