diff --git a/src/common.h b/src/common.h index 9971a59..9882222 100644 --- a/src/common.h +++ b/src/common.h @@ -14,7 +14,7 @@ #define BIT(n) (0x1U << (n)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) -#define CLAMP(n, hi, lo) (MIN((hi), MAX((n), (lo)))) +#define CLAMP(n, hi, lo) MIN((hi), MAX((n), (lo))) void Info(const char *fmt, ...); void Error(const char *fmt, ...); diff --git a/src/common/watchdog.c b/src/common/watchdog.c index 45fcbe8..3c8091b 100644 --- a/src/common/watchdog.c +++ b/src/common/watchdog.c @@ -106,6 +106,8 @@ void WDT_Disable(void) } } +/* +// See macro in watchdog.h void WDT_Reset(void) { // The WDR – Watchdog Reset – instruction resets the @@ -118,3 +120,4 @@ void WDT_Reset(void) __asm__("WDR"); } +*/ diff --git a/src/common/watchdog.h b/src/common/watchdog.h index d23b7eb..9c55baa 100644 --- a/src/common/watchdog.h +++ b/src/common/watchdog.h @@ -17,6 +17,8 @@ void WDT_Enable(void); void WDT_SetTimeoutFlag(byte flag); bool WDT_HasTriggered(void); void WDT_Disable(void); -void WDT_Reset(void); + +// Reset watchdog timer instruction +#define WDT_Reset() __asm__("WDR") #endif // MAD_CORE_COMMON_WATCHDOG_H