Skip to content

Commit

Permalink
Update port.c
Browse files Browse the repository at this point in the history
  • Loading branch information
guoweilkd committed Jun 18, 2019
1 parent 2fb1a88 commit aac4b8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FreeModbus/port/rtt/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

0 comments on commit aac4b8a

Please sign in to comment.