Пример #1
0
 public SunxiTimer(Machine machine)
 {
     timers = new SunxiTimerUnit[NumberOfTimerUnits];
     for (int i = 0; i < NumberOfTimerUnits; ++i)
     {
         int j = i;
         timers[i] = new SunxiTimerUnit(machine, this);
         timers[i].LimitReached += () => OnTimerLimitReached(j);
     }
     timerInterruptEnabled = new IFlagRegisterField[NumberOfTimerUnits];
     timerInterruptStatus  = new IFlagRegisterField[NumberOfTimerUnits];
     Timer0Irq             = new GPIO();
     Timer1Irq             = new GPIO();
     SetupRegisters();
 }
Пример #2
0
 public SunxiTimer(Machine machine)
 {
     timers = new SunxiTimerUnit[NumberOfTimerUnits];
     for(int i = 0; i < NumberOfTimerUnits; ++i)
     {
         int j = i;
         timers[i] = new SunxiTimerUnit(machine, this);
         timers[i].LimitReached += () => OnTimerLimitReached(j);
         timers[i].EventEnabled = true;
     }
     timerInterruptEnabled = new IFlagRegisterField[NumberOfTimerUnits];
     timerInterruptStatus = new IFlagRegisterField[NumberOfTimerUnits];
     Timer0Irq = new GPIO();
     Timer1Irq = new GPIO();
     SetupRegisters();
 }