mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Files at this revision

API Documentation at this revision

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
 }