summaryrefslogtreecommitdiff
path: root/firmware/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index d7112b971f..13bbc173c2 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -32,9 +32,7 @@
32#include "button.h" 32#include "button.h"
33#include "sprintf.h" 33#include "sprintf.h"
34 34
35#ifdef ARCHOS_RECORDER 35extern void dbg_ports(void); /* NASTY! defined in apps/ */
36extern void dbg_ports(void);
37#endif
38 36
39#define USB_REALLY_BRAVE 37#define USB_REALLY_BRAVE
40 38
@@ -86,6 +84,7 @@ static void usb_slave_mode(bool on)
86 if(on) 84 if(on)
87 { 85 {
88 DEBUGF("Entering USB slave mode\n"); 86 DEBUGF("Entering USB slave mode\n");
87 ata_soft_reset();
89 ata_enable(false); 88 ata_enable(false);
90 usb_enable(true); 89 usb_enable(true);
91 } 90 }
@@ -101,16 +100,14 @@ static void usb_slave_mode(bool on)
101 rc = ata_init(); 100 rc = ata_init();
102 if(rc) 101 if(rc)
103 { 102 {
104#ifdef ARCHOS_RECORDER
105 char str[32]; 103 char str[32];
106 lcd_clear_display(); 104 lcd_clear_display();
107 snprintf(str, 31, "ATA error: %d", rc); 105 snprintf(str, 31, "ATA error: %d", rc);
108 lcd_puts(0, 1, str); 106 lcd_puts(0, 0, str);
109 lcd_puts(0, 3, "Press ON to debug"); 107 lcd_puts(0, 1, "Press ON to debug");
110 lcd_update(); 108 lcd_update();
111 while(button_get(true) != BUTTON_ON) {}; 109 while(button_get(true) != BUTTON_ON) {};
112 dbg_ports(); 110 dbg_ports();
113#endif
114 panicf("ata: %d",rc); 111 panicf("ata: %d",rc);
115 } 112 }
116 113
@@ -248,7 +245,7 @@ static void usb_tick(void)
248 245
249void usb_acknowledge(int id) 246void usb_acknowledge(int id)
250{ 247{
251 queue_post(&usb_queue, id, NULL); 248 queue_post(&usb_queue, id, NULL);
252} 249}
253 250
254void usb_init(void) 251void usb_init(void)