summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-03-02 00:43:45 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-03-02 00:43:45 +0000
commitb879afd600b9ac4e7fa80687321d4f6633aecce0 (patch)
treea8313a51025f87a4c17ef1d0d7270abbb7c8ce9a /firmware
parent014568590d72729add3d508f7a1ab6a2ed6468fc (diff)
downloadrockbox-b879afd600b9ac4e7fa80687321d4f6633aecce0.tar.gz
rockbox-b879afd600b9ac4e7fa80687321d4f6633aecce0.zip
small cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16473 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/usb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 725dd5ed1d..08eacb865b 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -73,7 +73,9 @@ static struct thread_entry *usb_thread_entry;
73static struct event_queue usb_queue; 73static struct event_queue usb_queue;
74static int last_usb_status; 74static int last_usb_status;
75static bool usb_monitor_enabled; 75static bool usb_monitor_enabled;
76static bool exclusive_disk; 76#ifdef HAVE_USBSTACK
77static bool exclusive_ata_access;
78#endif
77 79
78 80
79#if defined(IPOD_COLOR) || defined(IPOD_4G) \ 81#if defined(IPOD_COLOR) || defined(IPOD_4G) \
@@ -243,7 +245,7 @@ static void usb_thread(void)
243#endif /* USE_ROCKBOX_USB */ 245#endif /* USE_ROCKBOX_USB */
244#ifdef HAVE_PRIORITY_SCHEDULING 246#ifdef HAVE_PRIORITY_SCHEDULING
245 thread_set_priority(usb_thread_entry,PRIORITY_REALTIME); 247 thread_set_priority(usb_thread_entry,PRIORITY_REALTIME);
246 exclusive_disk = true; 248 exclusive_ata_access = true;
247#endif 249#endif
248 250
249#else 251#else
@@ -264,7 +266,7 @@ static void usb_thread(void)
264 case USB_EXTRACTED: 266 case USB_EXTRACTED:
265#ifdef HAVE_USBSTACK 267#ifdef HAVE_USBSTACK
266 usb_enable(false); 268 usb_enable(false);
267 exclusive_disk = false; 269 exclusive_ata_access = false;
268#ifdef HAVE_PRIORITY_SCHEDULING 270#ifdef HAVE_PRIORITY_SCHEDULING
269 thread_set_priority(usb_thread_entry,PRIORITY_SYSTEM); 271 thread_set_priority(usb_thread_entry,PRIORITY_SYSTEM);
270#endif 272#endif
@@ -423,7 +425,7 @@ void usb_acknowledge(long id)
423void usb_init(void) 425void usb_init(void)
424{ 426{
425 usb_state = USB_EXTRACTED; 427 usb_state = USB_EXTRACTED;
426 exclusive_disk = false; 428 exclusive_ata_access = false;
427 usb_monitor_enabled = false; 429 usb_monitor_enabled = false;
428 countdown = -1; 430 countdown = -1;
429 431
@@ -505,14 +507,14 @@ bool usb_inserted(void)
505#ifdef HAVE_USBSTACK 507#ifdef HAVE_USBSTACK
506void usb_request_exclusive_ata(void) 508void usb_request_exclusive_ata(void)
507{ 509{
508 if(!exclusive_disk) { 510 if(!exclusive_ata_access) {
509 queue_post(&usb_queue, USB_REQUEST_DISK, 0); 511 queue_post(&usb_queue, USB_REQUEST_DISK, 0);
510 } 512 }
511} 513}
512 514
513bool usb_exclusive_ata(void) 515bool usb_exclusive_ata(void)
514{ 516{
515 return exclusive_disk; 517 return exclusive_ata_access;
516} 518}
517#endif 519#endif
518 520