diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-12-06 12:12:29 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-12-06 12:12:29 +0000 |
| commit | 01917ec9809f1abff87cb372b700fc09476d343e (patch) | |
| tree | 7e22b7368af35ecaf7d13c7abde4a350f792ac70 /firmware | |
| parent | 55e9670c702cbb13895c74a3b0ac32122e5b518f (diff) | |
| download | rockbox-01917ec9809f1abff87cb372b700fc09476d343e.zip rockbox-01917ec9809f1abff87cb372b700fc09476d343e.tar.gz rockbox-01917ec9809f1abff87cb372b700fc09476d343e.tar.bz2 rockbox-01917ec9809f1abff87cb372b700fc09476d343e.tar.xz | |
H300 bootloader USB mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8168 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/export/usb.h | 1 | ||||
| -rw-r--r-- | firmware/usb.c | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/firmware/export/usb.h b/firmware/export/usb.h index e8602e7..b16c11a 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -22,6 +22,7 @@ #include "kernel.h" void usb_init(void); +void usb_enable(bool on); void usb_start_monitoring(void); void usb_acknowledge(long id); void usb_wait_for_disconnect(struct event_queue *q); diff --git a/firmware/usb.c b/firmware/usb.c index 8f9de11..c453cb7 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -79,14 +79,15 @@ static int usb_mmc_countdown = 0; /* FIXME: The extra 0x800 is consumed by fat_mount() when the fsinfo needs updating */ +#ifndef BOOTLOADER static long usb_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)]; static const char usb_thread_name[] = "usb"; +#endif static struct event_queue usb_queue; static bool last_usb_status; static bool usb_monitor_enabled; - -static void usb_enable(bool on) +void usb_enable(bool on) { #ifdef USB_ENABLE_ONDIOSTYLE PACR2 &= ~0x04C0; /* use PA3, PA5 as GPIO */ @@ -173,6 +174,7 @@ static void usb_enable(bool on) #endif } +#ifndef BOOTLOADER static void usb_slave_mode(bool on) { int rc; @@ -347,6 +349,7 @@ static void usb_thread(void) } } } +#endif bool usb_detect(void) { @@ -378,7 +381,7 @@ bool usb_detect(void) return current_status; } - +#ifndef BOOTLOADER static void usb_tick(void) { bool current_status; @@ -431,6 +434,7 @@ static void usb_tick(void) } #endif } +#endif void usb_acknowledge(long id) { @@ -468,10 +472,12 @@ void usb_init(void) /* We assume that the USB cable is extracted */ last_usb_status = false; +#ifndef BOOTLOADER queue_init(&usb_queue); create_thread(usb_thread, usb_stack, sizeof(usb_stack), usb_thread_name); tick_add_task(usb_tick); +#endif } void usb_wait_for_disconnect(struct event_queue *q) |