Пример #1
0
        public VGAAlienArtModule(TimerModule.Factory timerFactory)
        {
            InitVGA(VGAControllerMode.SVGA_800_600_60);

            // 40MHz module clock
            patternTimer = timerFactory(200000000); // change pattern every 5 seconds
            offsetTimer  = timerFactory(2500000);   // offset patter 16 times per second
        }
Пример #2
0
        public BoardTimerModule(
            RuntimeConfiguration runtimeConfiguration,
            TimerModule.Factory timerFactory)
        {
            var attribute = BoardConfigResolver.ResolveAttribute();
            var config    = runtimeConfiguration.Config.Configurations.SingleOrDefault(c => c.Name == attribute?.Name);

            if (config == null)
            {
                throw new NullReferenceException($"Cannot find board configuration: {attribute?.Name ?? "<<board name was not specified>>"}");
            }

            timerModule10 = timerFactory(config.ClockFrequency);
            timerModule20 = timerFactory(config.ClockFrequency * 2);
        }