Work around missing ARCH_FREERTOS symbol.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 May 2006 00:38:42 +0000 (00:38 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 May 2006 00:38:42 +0000 (00:38 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@610 38d2e660-2303-0410-9eaa-f027e97ec537

drv/wdt.h

index c801757daaa2a572b9ebc7834f22f6422cbcc228..bfe3ce8891abf4c1c3b9021adab60cb56d36f5d2 100755 (executable)
--- a/drv/wdt.h
+++ b/drv/wdt.h
@@ -14,6 +14,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.10  2006/05/18 00:38:42  bernie
+ *#* Work around missing ARCH_FREERTOS symbol.
+ *#*
  *#* Revision 1.9  2006/03/22 09:49:09  bernie
  *#* Add FreeRTOS support.
  *#*
@@ -69,7 +72,7 @@
        #elif CPU_AVR
                #include <avr/io.h>
                #include <cfg/macros.h> // BV()
-       #elif (ARCH & ARCH_FREERTOS)
+       #elif defined(ARCH_FREERTOS) && (ARCH & ARCH_FREERTOS)
                #include <task.h> /* taskYIELD() */
        #else
                #error unknown CPU
@@ -89,7 +92,7 @@ INLINE void wdt_reset(void)
        #elif OS_POSIX
                static struct timeval tv = { 0, 0 };
                select(0, NULL, NULL, NULL, &tv);
-       #elif (ARCH & ARCH_FREERTOS)
+       #elif defined(ARCH_FREERTOS) && (ARCH & ARCH_FREERTOS)
                vTaskDelay(1);
        #elif CPU_AVR
                __asm__ __volatile__ ("wdr");
@@ -117,7 +120,7 @@ INLINE void wdt_init(uint8_t timeout)
                (void)timeout;
        #elif OS_POSIX
                (void)timeout; // NOP
-       #elif (ARCH & ARCH_FREERTOS)
+       #elif defined(ARCH_FREERTOS) && (ARCH & ARCH_FREERTOS)
                /* nop */
        #elif CPU_AVR
                WDTCR |= BV(WDCE) | BV(WDE);
@@ -137,7 +140,7 @@ INLINE void wdt_start(void)
                // NOP
        #elif OS_POSIX
                // NOP
-       #elif (ARCH & ARCH_FREERTOS)
+       #elif defined(ARCH_FREERTOS) && (ARCH & ARCH_FREERTOS)
                /* nop */
        #elif CPU_AVR
                WDTCR |= BV(WDE);
@@ -154,7 +157,7 @@ INLINE void wdt_stop(void)
                // NOP
        #elif OS_POSIX
                // NOP
-       #elif (ARCH & ARCH_FREERTOS)
+       #elif defined(ARCH_FREERTOS) && (ARCH & ARCH_FREERTOS)
                /* nop */
        #elif CPU_AVR
                WDTCR |= BV(WDCE) | BV(WDE);