Merge branch 'master' of https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32
This commit is contained in:
commit
29ae0afb3b
|
@ -24,15 +24,15 @@
|
||||||
/* ----------------------- Modbus includes ----------------------------------*/
|
/* ----------------------- Modbus includes ----------------------------------*/
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
/* ----------------------- Variables ----------------------------------------*/
|
/* ----------------------- Variables ----------------------------------------*/
|
||||||
static rt_base_t level;
|
|
||||||
/* ----------------------- Start implementation -----------------------------*/
|
/* ----------------------- Start implementation -----------------------------*/
|
||||||
void EnterCriticalSection(void)
|
void EnterCriticalSection(void)
|
||||||
{
|
{
|
||||||
level = rt_hw_interrupt_disable();
|
rt_enter_critical();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExitCriticalSection(void)
|
void ExitCriticalSection(void)
|
||||||
{
|
{
|
||||||
rt_hw_interrupt_enable(level);
|
rt_exit_critical();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue