bugfix(hw_timer): fix calculation overflow of timer less than 0x35A us error

This commit is contained in:
Xiong Yu
2018-10-02 14:57:51 +08:00
parent 85cd35e454
commit 153c109761

View File

@ -28,7 +28,7 @@
((t) ? \
(((t) > 0x35A) ? \
(((t) >> 2) * ((APB_CLK_FREQ >> 4) / 250000) + ((t)&0x3) * ((APB_CLK_FREQ >> 4) / 1000000)) : \
(((t) *(APB_CLK_FREQ>>4)) / 1000000)) : \
((t) *((APB_CLK_FREQ>>4) / 1000000))) : \
0)
#define FRC1_ENABLE_TIMER BIT7