From 80e4e0741e3615fbba481c1cb9ce35efde90a2f6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 27 Nov 2003 21:27:37 +0000 Subject: 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 --- firmware/usb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'firmware/usb.c') 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; -- cgit v1.2.3