summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/button-clickwheel.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-03-02 08:49:38 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-03-02 08:49:38 +0000
commit12375d1d3aa41f7d277a9af584c7b810b636ec95 (patch)
treefc9ce8029a6910a8dac71b3bf60c71155a01eea4 /firmware/target/arm/ipod/button-clickwheel.c
parent05e180a1308a095d51d51d0e047fcd44425ea88f (diff)
downloadrockbox-12375d1d3aa41f7d277a9af584c7b810b636ec95.tar.gz
rockbox-12375d1d3aa41f7d277a9af584c7b810b636ec95.zip
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
Diffstat (limited to 'firmware/target/arm/ipod/button-clickwheel.c')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c8
1 files changed, 4 insertions, 4 deletions
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;
84#endif 84#endif
85 85
86#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 86#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702
87static struct wakeup button_init_wakeup; 87static struct semaphore button_init_wakeup;
88#endif 88#endif
89 89
90#if CONFIG_CPU==S5L8702 90#if CONFIG_CPU==S5L8702
@@ -273,7 +273,7 @@ static inline int ipod_4g_button_read(void)
273 btn |= BUTTON_PLAY; 273 btn |= BUTTON_PLAY;
274 if (status & 0x00100000) 274 if (status & 0x00100000)
275 btn |= BUTTON_MENU; 275 btn |= BUTTON_MENU;
276 wakeup_signal(&button_init_wakeup); 276 semaphore_release(&button_init_wakeup);
277 } 277 }
278#endif 278#endif
279 279
@@ -373,7 +373,7 @@ void s5l_clickwheel_init(void)
373 373
374void button_init_device(void) 374void button_init_device(void)
375{ 375{
376 wakeup_init(&button_init_wakeup); 376 semaphore_init(&button_init_wakeup, 1, 0);
377#if CONFIG_CPU==S5L8701 377#if CONFIG_CPU==S5L8701
378 INTMSK |= (1<<26); 378 INTMSK |= (1<<26);
379#elif CONFIG_CPU==S5L8702 379#elif CONFIG_CPU==S5L8702
@@ -381,7 +381,7 @@ void button_init_device(void)
381 holdswitch_last_value = (pmu_read(0x87) & 2) == 0; 381 holdswitch_last_value = (pmu_read(0x87) & 2) == 0;
382#endif 382#endif
383 s5l_clickwheel_init(); 383 s5l_clickwheel_init();
384 wakeup_wait(&button_init_wakeup, HZ / 10); 384 semaphore_wait(&button_init_wakeup, HZ / 10);
385} 385}
386 386
387bool button_hold(void) 387bool button_hold(void)