From fb453ae1aa112b594b6cebc986ea2fc183f9f97d Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 19 Mar 2008 20:21:44 +0000 Subject: [PATCH] Corrected bug in ATmega168 demo in the RS-485 driver. Also updated the IAR project for Embedded workbench 5.10. Stats: IAR Atmel AVR C/C++ Compiler V5.10A/W32 10191 bytes of CODE memory (+36 range fill) 775 bytes of DATA memory (+24 absolute) avr-gcc (GCC) 4.2.2 (WinAVR 20071221rc1) Program: 12052 bytes (73.6% Full) Data: 481 bytes (47.0% Full) --- bacnet-stack/demo/object/av.c | 3 +- bacnet-stack/include/av.h | 4 ++ bacnet-stack/ports/atmega168/av.c | 1 + bacnet-stack/ports/atmega168/bacnet.ewp | 93 +++++++++++-------------- bacnet-stack/ports/atmega168/hardware.h | 2 +- bacnet-stack/ports/atmega168/iar2gcc.h | 13 ++-- bacnet-stack/ports/atmega168/main.c | 1 + bacnet-stack/ports/atmega168/rs485.c | 25 ++----- 8 files changed, 61 insertions(+), 81 deletions(-) diff --git a/bacnet-stack/demo/object/av.c b/bacnet-stack/demo/object/av.c index 665a32d8..78efbf1a 100644 --- a/bacnet-stack/demo/object/av.c +++ b/bacnet-stack/demo/object/av.c @@ -34,8 +34,7 @@ #include "bacapp.h" #include "config.h" /* the custom stuff */ #include "wp.h" - -#define MAX_ANALOG_VALUES 4 +#include "av.h" /* we choose to have a NULL level in our system represented by */ /* a particular value. When the priorities are not in use, they */ diff --git a/bacnet-stack/include/av.h b/bacnet-stack/include/av.h index d271366a..1b99117e 100644 --- a/bacnet-stack/include/av.h +++ b/bacnet-stack/include/av.h @@ -31,6 +31,10 @@ #include "bacerror.h" #include "wp.h" +#ifndef MAX_ANALOG_VALUES +#define MAX_ANALOG_VALUES 4 +#endif + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff --git a/bacnet-stack/ports/atmega168/av.c b/bacnet-stack/ports/atmega168/av.c index 78b09296..6026382a 100644 --- a/bacnet-stack/ports/atmega168/av.c +++ b/bacnet-stack/ports/atmega168/av.c @@ -33,6 +33,7 @@ #include "bacapp.h" #include "config.h" /* the custom stuff */ #include "wp.h" +#include "av.h" #if (MAX_ANALOG_VALUES > 10) #error Modify the Analog_Value_Name to handle multiple digits diff --git a/bacnet-stack/ports/atmega168/bacnet.ewp b/bacnet-stack/ports/atmega168/bacnet.ewp index c569fa46..606ee98e 100644 --- a/bacnet-stack/ports/atmega168/bacnet.ewp +++ b/bacnet-stack/ports/atmega168/bacnet.ewp @@ -10,9 +10,9 @@ 1 General - 3 + 5 - 6 + 7 1 1 + ICCAVR - 3 + 4 - 12 + 13 1 1 + AAVR - 3 + 4 - 9 + 10 1 1 - - - @@ -707,7 +703,7 @@