diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-20 21:59:51 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-20 21:59:51 +0000 |
commit | d2595ec0757607f094c758ed0f72f71cbe174955 (patch) | |
tree | 3e2a6e001eb64a743f0427ca4449d1ee05608e24 /firmware | |
parent | 4633446517c002ed81cdbbc6acb9b8ffd9becc85 (diff) |
Onda VX747: improve the USB insertion detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21001 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c index e519efc4ab..5ba8dd6981 100644 --- a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c @@ -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 |