mirror of
https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.git
synced 2024-09-01 08:09:25 +08:00
commit
49375ebf5b
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user