diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-11-27 21:27:37 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-11-27 21:27:37 +0000 |
commit | 80e4e0741e3615fbba481c1cb9ce35efde90a2f6 (patch) | |
tree | 0c6f4e11db5e11be8923fd21fe4fa579b3abc1b3 /firmware/usb.c | |
parent | 23e056e41b4f10b6ae607415de8adde99f7263cc (diff) | |
download | rockbox-80e4e0741e3615fbba481c1cb9ce35efde90a2f6.tar.gz rockbox-80e4e0741e3615fbba481c1cb9ce35efde90a2f6.zip |
Use the new defines to know what kind of USB detection to use.
NOTE: that this now makes the v2 use the correct method (the same as the
FM does)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4074 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usb.c')
-rw-r--r-- | firmware/usb.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/usb.c b/firmware/usb.c index 00fec53afa..431c2954aa 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -220,14 +220,14 @@ bool usb_detect(void) | |||
220 | { | 220 | { |
221 | bool current_status; | 221 | bool current_status; |
222 | 222 | ||
223 | #ifdef ARCHOS_RECORDER | 223 | #ifdef USB_RECORDERSTYLE |
224 | current_status = (adc_read(ADC_USB_POWER) > 500)?true:false; | 224 | current_status = (adc_read(ADC_USB_POWER) > 500)?true:false; |
225 | #else | 225 | #endif |
226 | #ifdef ARCHOS_FMRECORDER | 226 | #ifdef USB_FMRECORDERSTYLE |
227 | current_status = (adc_read(ADC_USB_POWER) < 512)?true:false; | 227 | current_status = (adc_read(ADC_USB_POWER) <= 512)?true:false; |
228 | #else | ||
229 | current_status = (PADR & 0x8000)?false:true; | ||
230 | #endif | 228 | #endif |
229 | #ifdef USB_PLAYERSTYLE | ||
230 | current_status = (PADR & 0x8000)?false:true; | ||
231 | #endif | 231 | #endif |
232 | 232 | ||
233 | return current_status; | 233 | return current_status; |