From 1dad174dd959eb51f60e4b202237d23cdc4f79ad 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 ++++---- library.properties | 2 +- 2 files changed, 5 insertions(+), 5 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 diff --git a/library.properties b/library.properties index 928713c..ec1edde 100644 --- a/library.properties +++ b/library.properties @@ -6,4 +6,4 @@ sentence=Enlighten your Arduino to be a Modbus master. paragraph=Enables communication with Modbus slaves over RS232/485 (via RTU protocol). Requires a RS232/485 transceiver. category=Communication url=https://github.com/4-20ma/ModbusMaster -architectures=* +architectures=avr,sam