From: bernie Date: Fri, 4 Nov 2005 16:19:33 +0000 (+0000) Subject: buz_init(): Restore IRQ protection as in project_bko. X-Git-Tag: 1.0.0~809 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=9a7b54ad73f63bd2adae3ddb093676be89e31139;p=bertos.git buz_init(): Restore IRQ protection as in project_bko. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@432 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/buzzer.c b/drv/buzzer.c index eaefe075..fd478a6b 100755 --- a/drv/buzzer.c +++ b/drv/buzzer.c @@ -17,6 +17,9 @@ /*#* *#* $Log$ + *#* Revision 1.16 2005/11/04 16:19:33 bernie + *#* buz_init(): Restore IRQ protection as in project_bko. + *#* *#* Revision 1.15 2005/06/27 21:25:50 bernie *#* Modularize hardware access; Port to new timer interface. *#* @@ -145,13 +148,17 @@ void buz_repeat_stop(void) /*! - * Initialize buzzer + * Initialize buzzer. */ void buz_init(void) { - BUZZER_INIT; + cpuflags_t flags; + IRQ_SAVE_DISABLE(flags); BUZZER_HW_INIT; - /* Inizializza software interrupt */ + + IRQ_RESTORE(flags); + + /* Init software interrupt. */ timer_set_event_softint(&buz_timer, (Hook)buz_softint, 0); }