From: bernie Date: Sun, 6 Jun 2004 16:09:22 +0000 (+0000) Subject: Reformat (from kseries). X-Git-Tag: 1.0.0~1222 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=3605c2189ab724bceedc302538feb01cc0083de2;p=bertos.git Reformat (from kseries). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@19 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/buzzer.c b/drv/buzzer.c index e5bedfd0..d0df8fc1 100755 --- a/drv/buzzer.c +++ b/drv/buzzer.c @@ -15,6 +15,9 @@ /* * $Log$ + * Revision 1.4 2004/06/06 16:09:22 bernie + * Reformat (from project_ks). + * * Revision 1.3 2004/06/03 11:27:09 bernie * Add dual-license information. * @@ -37,23 +40,23 @@ void Emul_BuzzerOff(void); void Emul_BuzzerInit(void); -# define IS_BUZZER_ON (Emul_IsBuzzerOn()) -# define BUZZER_ON (Emul_BuzzerOn()) -# define BUZZER_OFF (Emul_BuzzerOff()) -# define BUZZER_INIT (Emul_BuzzerInit()) + #define IS_BUZZER_ON (Emul_IsBuzzerOn()) + #define BUZZER_ON (Emul_BuzzerOn()) + #define BUZZER_OFF (Emul_BuzzerOff()) + #define BUZZER_INIT (Emul_BuzzerInit()) #elif defined(__AVR__) -# define IS_BUZZER_ON (PORTG & BV(PORTG0)) + #define IS_BUZZER_ON (PORTG & BV(PORTG0)) - /** + /*! * Buzzer manipulation macros * * \note Some PORTG functions are being used from * interrupt code, so we must be careful to * avoid race conditions. */ -# define BUZZER_ON \ + #define BUZZER_ON \ do { \ cpuflags_t _flags; \ DISABLE_IRQSAVE(_flags); \ @@ -61,7 +64,7 @@ ENABLE_IRQRESTORE(_flags); \ } while (0) -# define BUZZER_OFF \ + #define BUZZER_OFF \ do { \ cpuflags_t _flags; \ DISABLE_IRQSAVE(_flags); \ @@ -69,7 +72,7 @@ ENABLE_IRQRESTORE(_flags); \ } while (0) -# define BUZZER_INIT \ + #define BUZZER_INIT \ do { \ cpuflags_t _flags; \ DISABLE_IRQSAVE(_flags); \ @@ -80,10 +83,10 @@ #elif defined(__IAR_SYSTEMS_ICC) || defined(__IAR_SYSTEMS_ICC__) /* 80C196 */ -# define IS_BUZZER_ON (cpld->Buzzer & 1) -# define BUZZER_ON (cpld->Buzzer = 1) -# define BUZZER_OFF (cpld->Buzzer = 0) -# define BUZZER_INIT (cpld->Buzzer = 0) + #define IS_BUZZER_ON (cpld->Buzzer & 1) + #define BUZZER_ON (cpld->Buzzer = 1) + #define BUZZER_OFF (cpld->Buzzer = 0) + #define BUZZER_INIT (cpld->Buzzer = 0) #endif /* ARCH, __AVR__, __IAR_SYSTEM_ICC */