summaryrefslogtreecommitdiff
path: root/firmware/usb.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-04-18 21:32:41 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-04-18 21:32:41 +0000
commit00b407b04f42ed65d18c7fa2834530078d51249c (patch)
tree896da75f2a07992fe733b514b30132bf743e1b8c /firmware/usb.c
parent069191d9d4535b4eb4d7cafff43d7e6e23ac2014 (diff)
downloadrockbox-00b407b04f42ed65d18c7fa2834530078d51249c.tar.gz
rockbox-00b407b04f42ed65d18c7fa2834530078d51249c.zip
USB related Cosmetics, whitespace and readability fixes (FS#10147 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20737 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index fa7eef40d2..3d94ccfce7 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -42,7 +42,7 @@
42#ifdef HAVE_USBSTACK 42#ifdef HAVE_USBSTACK
43#include "usb_core.h" 43#include "usb_core.h"
44#endif 44#endif
45#include "logf.h" 45#include "logf.h"
46#include "screendump.h" 46#include "screendump.h"
47 47
48/* Conditions under which we want the entire driver */ 48/* Conditions under which we want the entire driver */
@@ -162,7 +162,7 @@ void usb_signal_transfer_completion(
162static inline void usb_slave_mode(bool on) 162static inline void usb_slave_mode(bool on)
163{ 163{
164 int rc; 164 int rc;
165 165
166 if(on) 166 if(on)
167 { 167 {
168 DEBUGF("Entering USB slave mode\n"); 168 DEBUGF("Entering USB slave mode\n");
@@ -180,13 +180,13 @@ static inline void usb_slave_mode(bool on)
180 180
181 /* Let the ISDx00 settle */ 181 /* Let the ISDx00 settle */
182 sleep(HZ*1); 182 sleep(HZ*1);
183 183
184 usb_enable(false); 184 usb_enable(false);
185 185
186 rc = storage_init(); 186 rc = storage_init();
187 if(rc) 187 if(rc)
188 panicf("storage: %d",rc); 188 panicf("storage: %d",rc);
189 189
190 rc = disk_mount_all(); 190 rc = disk_mount_all();
191 if (rc <= 0) /* no partition */ 191 if (rc <= 0) /* no partition */
192 panicf("mount: %d",rc); 192 panicf("mount: %d",rc);
@@ -272,10 +272,10 @@ static void usb_thread(void)
272#ifdef HAVE_USBSTACK 272#ifdef HAVE_USBSTACK
273#ifdef USB_STORAGE 273#ifdef USB_STORAGE
274 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, false); 274 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, false);
275#endif 275#endif
276#ifdef USB_CHARGING_ONLY 276#ifdef USB_CHARGING_ONLY
277 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, true); 277 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, true);
278#endif 278#endif
279 usb_attach(); 279 usb_attach();
280#endif 280#endif
281 break; 281 break;
@@ -290,10 +290,10 @@ static void usb_thread(void)
290#endif 290#endif
291#ifdef USB_STORAGE 291#ifdef USB_STORAGE
292 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, true); 292 usb_core_enable_driver(USB_DRIVER_MASS_STORAGE, true);
293#endif 293#endif
294#ifdef USB_CHARGING_ONLY 294#ifdef USB_CHARGING_ONLY
295 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, false); 295 usb_core_enable_driver(USB_DRIVER_CHARGING_ONLY, false);
296#endif 296#endif
297 297
298 /* Check any drivers enabled at this point for exclusive storage 298 /* Check any drivers enabled at this point for exclusive storage
299 * access requirements. */ 299 * access requirements. */
@@ -493,7 +493,7 @@ static void usb_tick(void)
493#endif /* USB_FIREWIRE_HANDLING */ 493#endif /* USB_FIREWIRE_HANDLING */
494 494
495 current_status = usb_detect(); 495 current_status = usb_detect();
496 496
497 /* Only report when the status has changed */ 497 /* Only report when the status has changed */
498 if(current_status != last_usb_status) 498 if(current_status != last_usb_status)
499 { 499 {
@@ -561,7 +561,7 @@ void usb_init(void)
561 usb_enable(false); 561 usb_enable(false);
562 562
563 queue_init(&usb_queue, true); 563 queue_init(&usb_queue, true);
564 564
565 usb_thread_entry = create_thread(usb_thread, usb_stack, 565 usb_thread_entry = create_thread(usb_thread, usb_stack,
566 sizeof(usb_stack), 0, usb_thread_name 566 sizeof(usb_stack), 0, usb_thread_name
567 IF_PRIO(, PRIORITY_SYSTEM) IF_COP(, CPU)); 567 IF_PRIO(, PRIORITY_SYSTEM) IF_COP(, CPU));