Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_STM/hal_tick_32b.c
- Revision:
- 180:96ed750bd169
- Parent:
- 175:af195413fb11
- Child:
- 186:707f6e361f3e
diff -r b0033dcd6934 -r 96ed750bd169 targets/TARGET_STM/hal_tick_32b.c
--- a/targets/TARGET_STM/hal_tick_32b.c Thu Dec 07 14:01:42 2017 +0000
+++ b/targets/TARGET_STM/hal_tick_32b.c Wed Jan 17 15:23:54 2018 +0000
@@ -42,7 +42,7 @@
if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC2) == SET) {
if (__HAL_TIM_GET_IT_SOURCE(&TimMasterHandle, TIM_IT_CC2) == SET) {
__HAL_TIM_CLEAR_IT(&TimMasterHandle, TIM_IT_CC2);
- uint32_t val = __HAL_TIM_GetCounter(&TimMasterHandle);
+ uint32_t val = __HAL_TIM_GET_COUNTER(&TimMasterHandle);
if ((val - PreviousVal) >= HAL_TICK_DELAY) {
// Increment HAL variable
HAL_IncTick();
@@ -114,7 +114,7 @@
// Channel 2 for HAL tick
HAL_TIM_OC_Start(&TimMasterHandle, TIM_CHANNEL_2);
- PreviousVal = __HAL_TIM_GetCounter(&TimMasterHandle);
+ PreviousVal = __HAL_TIM_GET_COUNTER(&TimMasterHandle);
__HAL_TIM_SET_COMPARE(&TimMasterHandle, TIM_CHANNEL_2, PreviousVal + HAL_TICK_DELAY);
__HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);
