diff options
author | Christian Starkjohann <cs+github@obdev.at> | 2008-10-18 15:41:24 +0000 |
---|---|---|
committer | Christian Starkjohann <cs+github@obdev.at> | 2008-10-18 15:41:24 +0000 |
commit | 81d3988ca8af8a763a9fddda0efa1b6f3ddfb251 (patch) | |
tree | ea8d738d4cc55f6d28940fee557dcadbb70456ac /usbdrv/usbconfig-prototype.h | |
parent | d93f7a22edcb9084ef0e3323cd527d1fbe3cd80d (diff) | |
download | v-usb-81d3988ca8af8a763a9fddda0efa1b6f3ddfb251.tar.gz v-usb-81d3988ca8af8a763a9fddda0efa1b6f3ddfb251.tar.bz2 v-usb-81d3988ca8af8a763a9fddda0efa1b6f3ddfb251.zip |
- added hook for SOF code
Diffstat (limited to 'usbdrv/usbconfig-prototype.h')
-rw-r--r-- | usbdrv/usbconfig-prototype.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usbdrv/usbconfig-prototype.h b/usbdrv/usbconfig-prototype.h index 5883461..03598c1 100644 --- a/usbdrv/usbconfig-prototype.h +++ b/usbdrv/usbconfig-prototype.h @@ -156,6 +156,24 @@ section at the end of this file). * counts SOF packets. This feature requires that the hardware interrupt is * connected to D- instead of D+. */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use registers + * YL and YH and SREG. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ #define USB_CFG_CHECK_DATA_TOGGLING 0 /* define this macro to 1 if you want to filter out duplicate data packets * sent by the host. Duplicates occur only as a consequence of communication |