X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fbuzzerled.c;h=7ce6f53c416d6cf5146b29ce4df3f66460deabf6;hb=2535cb94ec2183791128f8bbd109ca69a960cf78;hp=2aa7b15967ea940c4708868f2024c10c29d5dbe1;hpb=96f0ef786b54356c56cc3d4e4f0838df2505cfcc;p=bertos.git diff --git a/drv/buzzerled.c b/drv/buzzerled.c old mode 100755 new mode 100644 index 2aa7b159..7ce6f53c --- a/drv/buzzerled.c +++ b/drv/buzzerled.c @@ -1,9 +1,34 @@ -/*! +/** * \file * * * \brief Generic library to handle buzzers and leds @@ -25,25 +50,34 @@ * \author Giovanni Bajo */ -/* - * $Log$ - * Revision 1.2 2004/06/03 11:27:09 bernie - * Add dual-license information. - * - * Revision 1.1 2004/05/23 18:36:05 bernie - * Import buzzerled driver. - * - */ +/*#* + *#* $Log$ + *#* Revision 1.7 2006/07/19 12:56:25 bernie + *#* Convert to new Doxygen style. + *#* + *#* Revision 1.6 2005/11/04 16:20:02 bernie + *#* Fix reference to README.devlib in header. + *#* + *#* Revision 1.5 2004/12/08 09:43:41 bernie + *#* Add a todo item. + *#* + *#* Revision 1.4 2004/08/25 14:12:08 rasky + *#* Aggiornato il comment block dei log RCS + *#* + *#* Revision 1.3 2004/07/14 14:04:29 rasky + *#* Merge da SC: spostata bld_set inline perché si ottimizza parecchio tramite propagazione di costanti + *#* + *#* Revision 1.2 2004/06/03 11:27:09 bernie + *#* Add dual-license information. + *#* + *#* Revision 1.1 2004/05/23 18:36:05 bernie + *#* Import buzzerled driver. + *#* + *#*/ #include "buzzerled.h" #include "timer.h" -#if defined(__m56800__) - #include "buzzerled_dsp56k.h" -#else - #error Unsupported architecture -#endif - static struct Timer timers[NUM_BLDS]; static bool timer_go[NUM_BLDS]; @@ -69,14 +103,10 @@ void bld_init(void) bld_hw_init(); } -void bld_set(enum BLD_DEVICE device, bool enable) -{ - bld_hw_set(device, enable); -} - void bld_beep(enum BLD_DEVICE device, uint16_t duration) { - struct Timer* t = &timers[device]; + // \todo This is not reentrant for the same device. FIXME! + struct Timer *t = &timers[device]; timer_set_delay(t, duration); timer_set_event_softint(t, hook_turn_off, t); timer_add(t);