コード例 #1
0
 public UartTimerLogic(TimerBase owner) : base(owner)
 {
     // "The baud rate is generated by TIMER4 according to the equation
     // CLOCK4 / (TIMER4 + 1) / 8"
     // Additional divide by 8 requires shifting right 3 extra bits
     basePeriod = 3;
 }
コード例 #2
0
        public static ITimerLogic CreateTimerLogic(TimerBase owner, ClockSelect sourcePeriod, ITimerLogic currentTimerLogic)
        {
            if (sourcePeriod == ClockSelect.Linking)
            {
                return(new LinkingTimerLogic(owner));
            }

            ClockedTimerLogic timer = new ClockedTimerLogic(owner);

            timer.InitializeFrom(currentTimerLogic as ClockedTimerLogic);
            return(timer);
        }
コード例 #3
0
 public ClockedTimerLogic(TimerBase owner)
 {
     this.Owner = owner;
 }
コード例 #4
0
 public LinkingTimerLogic(TimerBase owner)
 {
     this.Owner = owner;
 }