summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-11-27 21:27:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-11-27 21:27:37 +0000
commit80e4e0741e3615fbba481c1cb9ce35efde90a2f6 (patch)
tree0c6f4e11db5e11be8923fd21fe4fa579b3abc1b3
parent23e056e41b4f10b6ae607415de8adde99f7263cc (diff)
downloadrockbox-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
-rw-r--r--firmware/usb.c14
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)
{
bool current_status;
-#ifdef ARCHOS_RECORDER
- current_status = (adc_read(ADC_USB_POWER) > 500)?true:false;
-#else
-#ifdef ARCHOS_FMRECORDER
- current_status = (adc_read(ADC_USB_POWER) < 512)?true:false;
-#else
- current_status = (PADR & 0x8000)?false:true;
+#ifdef USB_RECORDERSTYLE
+ current_status = (adc_read(ADC_USB_POWER) > 500)?true:false;
+#endif
+#ifdef USB_FMRECORDERSTYLE
+ current_status = (adc_read(ADC_USB_POWER) <= 512)?true:false;
#endif
+#ifdef USB_PLAYERSTYLE
+ current_status = (PADR & 0x8000)?false:true;
#endif
return current_status;