来自中国的硬件平台
Dependents: mbed_in_china_blink_led
Fork of mbed-src by
Revision 97:a69e21de83fb, committed 2014-02-18
- Comitter:
- mbed_official
- Date:
- Tue Feb 18 18:00:05 2014 +0000
- Parent:
- 96:c359415e941f
- Child:
- 98:3b81ecf1eeec
- Commit message:
- Synchronized with git revision 85837165133d2417a77f9cea67dfedd5aea2f929
Full URL: https://github.com/mbedmicro/mbed/commit/85837165133d2417a77f9cea67dfedd5aea2f929/
Properly round non integer bus-frequencies in MHz
Changed in this revision
targets/hal/TARGET_Freescale/TARGET_KLXX/us_ticker.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/us_ticker.c Tue Feb 18 15:45:07 2014 +0000 +++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/us_ticker.c Tue Feb 18 18:00:05 2014 +0000 @@ -44,7 +44,7 @@ PIT->CHANNEL[1].TCTRL |= PIT_TCTRL_TEN_MASK; // Start timer 1 // Use channel 0 as a prescaler for channel 1 - PIT->CHANNEL[0].LDVAL = bus_frequency() / 1000000 - 1; + PIT->CHANNEL[0].LDVAL = (bus_frequency() + 500000) / 1000000 - 1; PIT->CHANNEL[0].TCTRL = PIT_TCTRL_TEN_MASK; // Start timer 0, disable interrupts }