1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Daniel Stenberg 2003-11-27 21:27:37 +00:00
parent 23e056e41b
commit 80e4e0741e

View file

@ -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;