X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fbuzzer.c;h=dedc4fa81dc732fc242ea79d0fcfad789cf630e2;hb=3c11bc1916410f8325135265b1c2e8e3c21436b8;hp=810dd8e889f5b9fb78adbad4665b317620f120c2;hpb=242028fd1c37f6f62eeec094105cd28b41065ef0;p=bertos.git diff --git a/drv/buzzer.c b/drv/buzzer.c index 810dd8e8..dedc4fa8 100755 --- a/drv/buzzer.c +++ b/drv/buzzer.c @@ -1,45 +1,55 @@ /*! * \file * * * \version $Id$ * - * \author Bernardo Innocenti + * \brief Buzzer driver (implementation) * - * \brief Buzzer driver + * \version $Id$ + * \author Bernardo Innocenti */ -/* - * $Log$ - * Revision 1.7 2004/08/24 16:53:43 bernie - * Add missing headers. - * - * Revision 1.6 2004/06/07 18:10:06 aleph - * Remove free pool of timers; use user-provided Timer structure instead - * - * Revision 1.5 2004/06/07 15:54:23 aleph - * Update to new event.h naming - * - * 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. - * - * Revision 1.2 2004/05/23 18:21:53 bernie - * Trim CVS logs and cleanup header info. - * - */ +/*#* + *#* $Log$ + *#* Revision 1.10 2004/10/03 18:38:51 bernie + *#* Add missing AVR header; Fix header. + *#* + *#* Revision 1.9 2004/09/14 21:01:25 bernie + *#* Use new AVR port pin names. + *#* + *#* Revision 1.8 2004/08/25 14:12:08 rasky + *#* Aggiornato il comment block dei log RCS + *#* + *#* Revision 1.7 2004/08/24 16:53:43 bernie + *#* Add missing headers. + *#* + *#* Revision 1.6 2004/06/07 18:10:06 aleph + *#* Remove free pool of timers; use user-provided Timer structure instead + *#* + *#* Revision 1.5 2004/06/07 15:54:23 aleph + *#* Update to new event.h naming + *#* + *#* 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. + *#* + *#* Revision 1.2 2004/05/23 18:21:53 bernie + *#* Trim CVS logs and cleanup header info. + *#* + *#*/ #include "buzzer.h" #include -#include #include +#include #include #include @@ -58,7 +68,9 @@ #elif defined(__AVR__) - #define IS_BUZZER_ON (PORTG & BV(PORTG0)) + #include + + #define IS_BUZZER_ON (PORTG & BV(PG0)) /*! * Buzzer manipulation macros @@ -71,7 +83,7 @@ do { \ cpuflags_t _flags; \ DISABLE_IRQSAVE(_flags); \ - PORTG |= BV(PORTG0); \ + PORTG |= BV(PG0); \ ENABLE_IRQRESTORE(_flags); \ } while (0) @@ -79,7 +91,7 @@ do { \ cpuflags_t _flags; \ DISABLE_IRQSAVE(_flags); \ - PORTG &= ~BV(PORTG0); \ + PORTG &= ~BV(PG0); \ ENABLE_IRQRESTORE(_flags); \ } while (0) @@ -87,8 +99,8 @@ do { \ cpuflags_t _flags; \ DISABLE_IRQSAVE(_flags); \ - PORTG &= ~BV(PORTG0); \ - DDRG |= BV(PORTG0); \ + PORTG &= ~BV(PG0); \ + DDRG |= BV(PG0); \ ENABLE_IRQRESTORE(_flags); \ } while (0)