From 6736392c3ca4888d50b345da969d8253afd1f776 Mon Sep 17 00:00:00 2001 From: Doc Walker <4-20ma@wvfans.net> Date: Fri, 22 May 2015 13:19:18 -0500 Subject: [PATCH] Fix #27 Update architecture switch --- ModbusMaster.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ModbusMaster.cpp b/ModbusMaster.cpp index 70fe245..419e8f0 100644 --- a/ModbusMaster.cpp +++ b/ModbusMaster.cpp @@ -33,12 +33,12 @@ Arduino library for communicating with Modbus slaves over RS232/485 (via RTU pro /* _____GLOBAL VARIABLES_____________________________________________________ */ -#ifdef __AVR__ +#if defined(ARDUINO_ARCH_AVR) HardwareSerial* MBSerial = &Serial; ///< Pointer to Serial class object -#endif - -#ifdef __arm__ +#elif defined(ARDUINO_ARCH_SAM) UARTClass* MBSerial = &Serial; ///< Pointer to Serial class object +#else + #error "This library only supports boards with an AVR or SAM processor. Please open an issue at https://github.com/4-20ma/ModbusMaster/issues and indicate which processor/platform you're using." #endif