From: lottaviano Date: Tue, 1 Sep 2009 15:23:25 +0000 (+0000) Subject: Fix warnings on AVR serial hw. X-Git-Tag: 2.2.0~121 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=e603425ebb795a273a11c073033544f6a51b9247;p=bertos.git Fix warnings on AVR serial hw. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2847 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/avr/drv/ser_avr.c b/bertos/cpu/avr/drv/ser_avr.c index d3cc743d..f4cf42de 100644 --- a/bertos/cpu/avr/drv/ser_avr.c +++ b/bertos/cpu/avr/drv/ser_avr.c @@ -286,23 +286,6 @@ #endif -/** - * \def CONFIG_SER_STROBE - * - * This is a debug facility that can be used to - * monitor SER interrupt activity on an external pin. - * - * To use strobes, redefine the macros SER_STROBE_ON, - * SER_STROBE_OFF and SER_STROBE_INIT and set - * CONFIG_SER_STROBE to 1. - */ -#if !defined(CONFIG_SER_STROBE) || !CONFIG_SER_STROBE - #define SER_STROBE_ON do {/*nop*/} while(0) - #define SER_STROBE_OFF do {/*nop*/} while(0) - #define SER_STROBE_INIT do {/*nop*/} while(0) -#endif - - /* From the high-level serial driver */ extern struct Serial *ser_handles[SER_CNT]; diff --git a/bertos/hw/hw_ser.h b/bertos/hw/hw_ser.h index 6cef85a9..75afc77c 100644 --- a/bertos/hw/hw_ser.h +++ b/bertos/hw/hw_ser.h @@ -40,4 +40,18 @@ #ifndef HW_SER_H #define HW_SER_H +#include "cfg/cfg_ser.h" + +#if CONFIG_SER_STROBE + #warning FIXME: this is an example implementation, you must implement it + + #define SER_STROBE_INIT do { /* implement me */ } while (0) + #define SER_STROBE_ON do { /* implement me */ } while (0) + #define SER_STROBE_OFF do { /* implement me */ } while (0) +#else + #define SER_STROBE_INIT /* nothing */ + #define SER_STROBE_ON /* nothing */ + #define SER_STROBE_OFF /* nothing */ +#endif + #endif /* HW_SER_H */