summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/ascodec-as3525.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/ascodec-as3525.c b/firmware/target/arm/as3525/ascodec-as3525.c
index 52d50ef077..adc9b7f9a8 100644
--- a/firmware/target/arm/as3525/ascodec-as3525.c
+++ b/firmware/target/arm/as3525/ascodec-as3525.c
@@ -190,6 +190,12 @@ void ascodec_init(void)
190 VIC_INT_ENABLE = INTERRUPT_AUDIO; 190 VIC_INT_ENABLE = INTERRUPT_AUDIO;
191#endif 191#endif
192 192
193 /* detect if USB was connected at startup since there is no transition */
194 if(ascodec_read(AS3514_IRQ_ENRD0) & USB_STATUS)
195 usb_insert_int();
196 else
197 usb_remove_int();
198
193 /* Generate irq for usb+charge status change */ 199 /* Generate irq for usb+charge status change */
194 ascodec_write(AS3514_IRQ_ENRD0, 200 ascodec_write(AS3514_IRQ_ENRD0,
195#ifdef CONFIG_CHARGING /* m200v4 can't charge */ 201#ifdef CONFIG_CHARGING /* m200v4 can't charge */