Examples of MicrocontrollerFactory


Examples of avrora.sim.mcu.MicrocontrollerFactory

            long hz = CLOCKSPEED.get();
            long exthz = EXTCLOCKSPEED.get();
            if ( exthz == 0 ) exthz = hz;
            if ( exthz > hz )
                Avrora.userError("External clock is greater than main clock speed", exthz+"hz");
            MicrocontrollerFactory mcf = Defaults.getMicrocontroller(MCU.get());
            return new DefaultPlatform.Factory(hz, exthz, mcf);
        } else {
            PlatformFactory pff = Defaults.getPlatform(pfs);
            return pff;
        }
View Full Code Here

Examples of avrora.sim.mcu.MicrocontrollerFactory

    public static InterpreterFactory getInterpreterFactory() {
        return DEFAULT_IF;
    }

    public static Simulator newSimulator(int id, String mcu, long hz, long exthz, InterpreterFactory factory, Program p) {
        MicrocontrollerFactory f = getMicrocontroller(mcu);
        ClockDomain cd = new ClockDomain(hz);
        cd.newClock("external", exthz);

        return f.newMicrocontroller(id, cd, factory, p).getSimulator();
    }
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.