From 12375d1d3aa41f7d277a9af584c7b810b636ec95 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 2 Mar 2011 08:49:38 +0000 Subject: Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/ipod/button-clickwheel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/target/arm/ipod/button-clickwheel.c') diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c index dd561b2e50..d5edd2bebc 100644 --- a/firmware/target/arm/ipod/button-clickwheel.c +++ b/firmware/target/arm/ipod/button-clickwheel.c @@ -84,7 +84,7 @@ int int_btn = BUTTON_NONE; #endif #if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 -static struct wakeup button_init_wakeup; +static struct semaphore button_init_wakeup; #endif #if CONFIG_CPU==S5L8702 @@ -273,7 +273,7 @@ static inline int ipod_4g_button_read(void) btn |= BUTTON_PLAY; if (status & 0x00100000) btn |= BUTTON_MENU; - wakeup_signal(&button_init_wakeup); + semaphore_release(&button_init_wakeup); } #endif @@ -373,7 +373,7 @@ void s5l_clickwheel_init(void) void button_init_device(void) { - wakeup_init(&button_init_wakeup); + semaphore_init(&button_init_wakeup, 1, 0); #if CONFIG_CPU==S5L8701 INTMSK |= (1<<26); #elif CONFIG_CPU==S5L8702 @@ -381,7 +381,7 @@ void button_init_device(void) holdswitch_last_value = (pmu_read(0x87) & 2) == 0; #endif s5l_clickwheel_init(); - wakeup_wait(&button_init_wakeup, HZ / 10); + semaphore_wait(&button_init_wakeup, HZ / 10); } bool button_hold(void) -- cgit v1.2.3