mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
as3525: correctly detect usb status if we boot with USB plugged
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26118 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
949d99546e
commit
7dd0297a4d
1 changed files with 6 additions and 0 deletions
|
|
@ -190,6 +190,12 @@ void ascodec_init(void)
|
||||||
VIC_INT_ENABLE = INTERRUPT_AUDIO;
|
VIC_INT_ENABLE = INTERRUPT_AUDIO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* detect if USB was connected at startup since there is no transition */
|
||||||
|
if(ascodec_read(AS3514_IRQ_ENRD0) & USB_STATUS)
|
||||||
|
usb_insert_int();
|
||||||
|
else
|
||||||
|
usb_remove_int();
|
||||||
|
|
||||||
/* Generate irq for usb+charge status change */
|
/* Generate irq for usb+charge status change */
|
||||||
ascodec_write(AS3514_IRQ_ENRD0,
|
ascodec_write(AS3514_IRQ_ENRD0,
|
||||||
#ifdef CONFIG_CHARGING /* m200v4 can't charge */
|
#ifdef CONFIG_CHARGING /* m200v4 can't charge */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue