mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
Onda VX747: improve the USB insertion detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21001 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4633446517
commit
d2595ec075
1 changed files with 7 additions and 1 deletions
|
|
@ -633,9 +633,15 @@ void usb_init_device(void)
|
|||
}
|
||||
|
||||
#ifdef USB_GPIO_IRQ
|
||||
static unsigned long last_tick;
|
||||
void USB_GPIO_IRQ(void)
|
||||
{
|
||||
usb_status_event(usb_detect());
|
||||
/* Prevent enabled-disabled bouncing */
|
||||
if(current_tick - last_tick > HZ/16)
|
||||
{
|
||||
usb_status_event(usb_detect());
|
||||
last_tick = current_tick;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue