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:
parent
23e056e41b
commit
80e4e0741e
1 changed files with 7 additions and 7 deletions
|
|
@ -220,14 +220,14 @@ bool usb_detect(void)
|
||||||
{
|
{
|
||||||
bool current_status;
|
bool current_status;
|
||||||
|
|
||||||
#ifdef ARCHOS_RECORDER
|
#ifdef USB_RECORDERSTYLE
|
||||||
current_status = (adc_read(ADC_USB_POWER) > 500)?true:false;
|
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;
|
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
|
||||||
return current_status;
|
return current_status;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue