This commit is contained in:
armink 2020-05-11 16:39:12 +08:00
commit 29ae0afb3b
1 changed files with 3 additions and 3 deletions

View File

@ -24,15 +24,15 @@
/* ----------------------- Modbus includes ----------------------------------*/
#include "port.h"
/* ----------------------- Variables ----------------------------------------*/
static rt_base_t level;
/* ----------------------- Start implementation -----------------------------*/
void EnterCriticalSection(void)
{
level = rt_hw_interrupt_disable();
rt_enter_critical();
}
void ExitCriticalSection(void)
{
rt_hw_interrupt_enable(level);
rt_exit_critical();
}