diff options
author | Christian Starkjohann <cs+github@obdev.at> | 2008-10-20 13:18:06 +0000 |
---|---|---|
committer | Christian Starkjohann <cs+github@obdev.at> | 2008-10-20 13:18:06 +0000 |
commit | 232152349a0a601dd67581850fd08e108867d250 (patch) | |
tree | 8483e0f62103db8dfafeaf1d5c5d84a63a748658 | |
parent | ba8ebf1ff0477f74670fd67132d319cf3eb5a022 (diff) | |
download | v-usb-232152349a0a601dd67581850fd08e108867d250.tar.gz v-usb-232152349a0a601dd67581850fd08e108867d250.tar.bz2 v-usb-232152349a0a601dd67581850fd08e108867d250.zip |
- if any SOF logic is used, assume interrupt on D- and thus falling edge trigger
-rw-r--r-- | usbdrv/usbdrv.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usbdrv/usbdrv.h b/usbdrv/usbdrv.h index bf9418d..5bab059 100644 --- a/usbdrv/usbdrv.h +++ b/usbdrv/usbdrv.h @@ -566,7 +566,14 @@ int usbDescriptorStringSerialNumber[]; # endif #endif #ifndef USB_INTR_CFG_SET /* allow user to override our default */ -# define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) /* cfg for rising edge */ +# if defined(USB_COUNT_SOF) || defined(USB_SOF_HOOK) +# define USB_INTR_CFG_SET (1 << ISC01) /* cfg for falling edge */ + /* If any SOF logic is used, the interrupt must be wired to D- where + * we better trigger on falling edge + */ +# else +# define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) /* cfg for rising edge */ +# endif #endif #ifndef USB_INTR_CFG_CLR /* allow user to override our default */ # define USB_INTR_CFG_CLR 0 /* no bits to clear */ |