1.修复定时不准的问题。

This commit is contained in:
MacRsh
2023-09-11 18:15:37 +08:00
parent d0cce3064b
commit c3015fa40a
2 changed files with 3 additions and 5 deletions

View File

@@ -289,12 +289,10 @@ void mr_timer_device_isr(mr_timer_t timer, mr_uint32_t event)
case MR_TIMER_EVENT_PIT_INT:
{
timer->overflow++;
timer->cycles--;
/* Timeout */
if (timer->cycles != 0)
{
timer->cycles--;
} else
if (timer->cycles == 0)
{
timer->cycles = timer->reload;
timer->overflow = 0;

View File

@@ -13,7 +13,7 @@
| 3 | MR_INIT_MODULE_EXPORT | 组件初始化 |
| 4 | MR_INIT_APP_EXPORT | 应用初始化 |
![流程图](https://gitee.com/MacRsh/mr-library/raw/master/document/resource/auto_init_process.jpg)
![流程图](https://gitee.com/MacRsh/mr-library/raw/develop/document/resource/auto_init_process.jpg)
自动初始化仅指定类型的函数: