File tree Expand file tree Collapse file tree 7 files changed +10
-14
lines changed
bsp/stm32/libraries/HAL_Drivers Expand file tree Collapse file tree 7 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ void SysTick_Handler(void)
5858
5959uint32_t HAL_GetTick (void )
6060{
61- return rt_hw_1ms_tick_get ();
61+ return rt_tick_get_millisecond ();
6262}
6363
6464void HAL_SuspendTick (void )
Original file line number Diff line number Diff line change @@ -618,7 +618,7 @@ u32_t sys_jiffies(void)
618618
619619u32_t sys_now (void )
620620{
621- return rt_hw_1ms_tick_get ();
621+ return rt_tick_get_millisecond ();
622622}
623623
624624#ifdef RT_LWIP_PPP
Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ u32_t sys_jiffies(void)
628628
629629u32_t sys_now (void )
630630{
631- return rt_hw_1ms_tick_get ();
631+ return rt_tick_get_millisecond ();
632632}
633633
634634
Original file line number Diff line number Diff line change @@ -642,7 +642,7 @@ u32_t sys_jiffies(void)
642642
643643u32_t sys_now (void )
644644{
645- return rt_hw_1ms_tick_get ();
645+ return rt_tick_get_millisecond ();
646646}
647647
648648#if MEM_OVERFLOW_CHECK || MEMP_OVERFLOW_CHECK
Original file line number Diff line number Diff line change @@ -134,11 +134,6 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void *context));
134134 */
135135void rt_hw_us_delay (rt_uint32_t us );
136136
137- /*
138- * provides a tick value ALWAYS in millisecond
139- */
140- rt_tick_t rt_hw_1ms_tick_get (void );
141-
142137#ifdef RT_USING_SMP
143138typedef union {
144139 unsigned long slock ;
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ rt_tick_t rt_tick_get(void);
7777void rt_tick_set (rt_tick_t tick );
7878void rt_tick_increase (void );
7979rt_tick_t rt_tick_from_millisecond (rt_int32_t ms );
80+ rt_tick_t rt_tick_get_millisecond (void );
8081
8182void rt_system_timer_init (void );
8283void rt_system_timer_thread_init (void );
Original file line number Diff line number Diff line change @@ -118,14 +118,14 @@ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
118118RTM_EXPORT (rt_tick_from_millisecond );
119119
120120/**
121- * This function provides a tick value ALWAYS in millisecond
121+ * This function will provide the passed millisecond from boot.
122122 *
123- * @return 1ms-based tick
123+ * @return passed millisecond from boot
124124 */
125- RT_WEAK rt_tick_t rt_hw_1ms_tick_get (void )
125+ RT_WEAK rt_tick_t rt_tick_get_millisecond (void )
126126{
127- #if 1000 % RT_TICK_PER_SECOND == 0
128- return rt_tick_get () * (1000U / RT_TICK_PER_SECOND );
127+ #if 1000 % RT_TICK_PER_SECOND == 0u
128+ return rt_tick_get () * (1000u / RT_TICK_PER_SECOND );
129129#else
130130 #warning "rt-thread cannot provide a correct 1ms-based tick any longer,\
131131 please redefine this function in another file by using a high-precision hard-timer."
You can’t perform that action at this time.
0 commit comments