From b5af89bbf22b780acfaceb64b924d3767bb0c0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B6=E4=B8=AD=E6=96=AD=E5=BB=B6=E8=BF=9F=E7=9A=84RTOS?= Date: Tue, 18 Feb 2025 05:32:38 +0000 Subject: [PATCH] update Port/8051/port_8051.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 零中断延迟的RTOS --- Port/8051/port_8051.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Port/8051/port_8051.h b/Port/8051/port_8051.h index b732bda6..78ac24c3 100644 --- a/Port/8051/port_8051.h +++ b/Port/8051/port_8051.h @@ -3,8 +3,8 @@ * @file port_8051.h * @brief 8051 Core Port File * @author 迟凯峰 - * @version V1.0.0 - * @date 2025.02.08 + * @version V1.0.1 + * @date 2025.02.18 ******************************************************************************/ #ifndef __PORT_8051_H @@ -144,8 +144,9 @@ do{ \ #define mSysTick_Counting \ do{ \ - if(mSysTick_Counter <= tick_temp) break; \ - s_tick_counter1 += mSysTick_Counter - tick_temp; \ + m_tick_t temp = mSysTick_Counter; \ + if(temp <= tick_temp) break; \ + s_tick_counter1 += temp - tick_temp; \ s_tick_counter2++; \ }while(false)