From 8391f9676abafaa16a986b77b346f33ceb75dd6d Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 4 Sep 2009 19:46:02 +0000 Subject: [PATCH] Fix serial hw macros. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2883 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/ser_at91.c | 15 --------------- bertos/drv/ser.h | 16 ++++++++++++++++ bertos/hw/hw_ser.h | 4 ---- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index bc555160..dfc429d3 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -202,21 +202,6 @@ /*\}*/ -/** - * \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 */ diff --git a/bertos/drv/ser.h b/bertos/drv/ser.h index 0c61df4e..c264811e 100644 --- a/bertos/drv/ser.h +++ b/bertos/drv/ser.h @@ -119,6 +119,22 @@ /*\}*/ +/** + * \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 + struct SerialHardware; /** Human-readable serial error descriptions */ diff --git a/bertos/hw/hw_ser.h b/bertos/hw/hw_ser.h index 75afc77c..2489c433 100644 --- a/bertos/hw/hw_ser.h +++ b/bertos/hw/hw_ser.h @@ -48,10 +48,6 @@ #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 */ -- 2.25.1