mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
as3525: cache first read of enrd0 register
We need it for correct charger detection if we boot with charger plugged because there is no edge interrupt git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26936 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
90bc818696
commit
61c90fbf3f
1 changed files with 2 additions and 1 deletions
|
|
@ -284,7 +284,8 @@ void ascodec_init(void)
|
||||||
VIC_INT_ENABLE = INTERRUPT_AUDIO;
|
VIC_INT_ENABLE = INTERRUPT_AUDIO;
|
||||||
|
|
||||||
/* detect if USB was connected at startup since there is no transition */
|
/* detect if USB was connected at startup since there is no transition */
|
||||||
if(ascodec_read(AS3514_IRQ_ENRD0) & USB_STATUS)
|
ascodec_enrd0_shadow = ascodec_read(AS3514_IRQ_ENRD0);
|
||||||
|
if(ascodec_enrd0_shadow & USB_STATUS)
|
||||||
usb_insert_int();
|
usb_insert_int();
|
||||||
else
|
else
|
||||||
usb_remove_int();
|
usb_remove_int();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue