from Cam Marshall original modbus

Dependencies:   mbed

Fork of Modbus by Cam Marshall

Revision:
5:c712a10c9414
Parent:
1:7dc3a566a85a
--- a/Modbus/port.h	Tue Mar 14 14:25:27 2017 +0800
+++ b/Modbus/port.h	Tue Mar 14 22:23:17 2017 +0800
@@ -24,13 +24,13 @@
 
 #include <assert.h>
 #include <inttypes.h>
-
+#include "mbed.h" //stanley
 #define INLINE                      //inline
 #define PR_BEGIN_EXTERN_C           //extern "C" {
 #define PR_END_EXTERN_C             //}
 
-#define ENTER_CRITICAL_SECTION( )   
-#define EXIT_CRITICAL_SECTION( )    
+#define ENTER_CRITICAL_SECTION( )   __disable_irq() //stanley
+#define EXIT_CRITICAL_SECTION( )    __enable_irq() //stanley
 
 typedef uint8_t BOOL;