You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#defineMAX_TIMER_PERIOD 55923UL //Time per tick = 0.8533333
124
-
#defineuS_TO_TIMER_COMPARE(uS) ((uS * 75UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
124
+
#defineuS_TO_TIMER_COMPARE(uS) (((uS) * 75UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
125
125
#elifF_CPU==528000000
126
126
//Bus Clock is 132Mhz @ 528 Mhz CPU.
127
127
#defineMAX_TIMER_PERIOD 63549UL //Time per tick = 0.96969696
128
-
#defineuS_TO_TIMER_COMPARE(uS) ((uS * 66UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
128
+
#defineuS_TO_TIMER_COMPARE(uS) (((uS) * 66UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
129
129
#elifF_CPU==450000000
130
130
//Bus Clock is 150Mhz @ 450 Mhz CPU.
131
131
#defineMAX_TIMER_PERIOD 55923UL //Time per tick = 0.8533333
132
-
#defineuS_TO_TIMER_COMPARE(uS) ((uS * 75UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
132
+
#defineuS_TO_TIMER_COMPARE(uS) (((uS) * 75UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
133
133
#elifF_CPU==396000000
134
134
//Bus Clock is 132Mhz @ 396 Mhz CPU.
135
135
#defineMAX_TIMER_PERIOD 63549UL //Time per tick = 0.96969696
136
-
#defineuS_TO_TIMER_COMPARE(uS) ((uS * 66UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
136
+
#defineuS_TO_TIMER_COMPARE(uS) (((uS) * 66UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
137
137
#elifF_CPU==150000000
138
138
//Bus Clock is 75Mhz @ 150 Mhz CPU.
139
139
#defineMAX_TIMER_PERIOD 111846UL //Time per tick = 1.706666
140
-
#defineuS_TO_TIMER_COMPARE(uS) ((uS * 75UL) >> 7) //Converts a given number of uS into the required number of timer ticks until that time has passed.
140
+
#defineuS_TO_TIMER_COMPARE(uS) (((uS) * 75UL) >> 7) //Converts a given number of uS into the required number of timer ticks until that time has passed.
0 commit comments