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.

Revision:
402:09075a3b15e3
Parent:
304:89b9c3a9a045
Child:
404:cbc7dfcb0ce9
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/us_ticker.c	Fri Nov 14 08:45:06 2014 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/us_ticker.c	Fri Nov 14 09:00:07 2014 +0000
@@ -37,7 +37,8 @@
 static TIM_HandleTypeDef TimMasterHandle;
 static int us_ticker_inited = 0;
 
-void us_ticker_init(void) {
+void us_ticker_init(void)
+{
     if (us_ticker_inited) return;
     us_ticker_inited = 1;
 
@@ -63,22 +64,26 @@
     HAL_TIM_OC_Start(&TimMasterHandle, TIM_CHANNEL_1);
 }
 
-uint32_t us_ticker_read() {
+uint32_t us_ticker_read()
+{
     if (!us_ticker_inited) us_ticker_init();
     return TIM_MST->CNT;
 }
 
-void us_ticker_set_interrupt(timestamp_t timestamp) {
+void us_ticker_set_interrupt(timestamp_t timestamp)
+{
     // Set new output compare value
     __HAL_TIM_SetCompare(&TimMasterHandle, TIM_CHANNEL_1, (uint32_t)timestamp);
     // Enable IT
     __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC1);
 }
 
-void us_ticker_disable_interrupt(void) {
+void us_ticker_disable_interrupt(void)
+{
     __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC1);
 }
 
-void us_ticker_clear_interrupt(void) {
+void us_ticker_clear_interrupt(void)
+{
     __HAL_TIM_CLEAR_IT(&TimMasterHandle, TIM_IT_CC1);
 }