diff options
author | Christian Starkjohann <cs+github@obdev.at> | 2008-10-21 16:13:07 +0000 |
---|---|---|
committer | Christian Starkjohann <cs+github@obdev.at> | 2008-10-21 16:13:07 +0000 |
commit | d12a1700cd3ddefd7a3bcfcff2238ec6ec6d1234 (patch) | |
tree | e4364b16786037864b3f778ab687fd1d75953ebb /usbdrv/usbdrv.c | |
parent | ae840220bb1cc546e81992ea3e6e22f7b2a543d2 (diff) | |
download | v-usb-d12a1700cd3ddefd7a3bcfcff2238ec6ec6d1234.tar.gz v-usb-d12a1700cd3ddefd7a3bcfcff2238ec6ec6d1234.tar.bz2 v-usb-d12a1700cd3ddefd7a3bcfcff2238ec6ec6d1234.zip |
- implemented option USB_CFG_SUPPRESS_INTR_CODE
Diffstat (limited to 'usbdrv/usbdrv.c')
-rw-r--r-- | usbdrv/usbdrv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c index 583d53a..2df6ad7 100644 --- a/usbdrv/usbdrv.c +++ b/usbdrv/usbdrv.c @@ -34,7 +34,7 @@ uchar usbTxBuf[USB_BUFSIZE];/* data to transmit with next IN, free if usbT #if USB_COUNT_SOF volatile uchar usbSofCount; /* incremented by assembler module every SOF */ #endif -#if USB_CFG_HAVE_INTRIN_ENDPOINT +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE usbTxStatus_t usbTxStatus1; # if USB_CFG_HAVE_INTRIN_ENDPOINT3 usbTxStatus_t usbTxStatus3; @@ -196,7 +196,7 @@ PROGMEM char usbDescriptorConfiguration[] = { /* USB configuration descriptor static inline void usbResetDataToggling(void) { -#if USB_CFG_HAVE_INTRIN_ENDPOINT +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ # if USB_CFG_HAVE_INTRIN_ENDPOINT3 USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ @@ -216,6 +216,7 @@ static inline void usbResetStall(void) /* ------------------------------------------------------------------------- */ +#if !USB_CFG_SUPPRESS_INTR_CODE #if USB_CFG_HAVE_INTRIN_ENDPOINT static void usbGenericSetInterrupt(uchar *data, uchar len, usbTxStatus_t *txStatus) { @@ -253,6 +254,7 @@ USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len) usbGenericSetInterrupt(data, len, &usbTxStatus3); } #endif +#endif /* USB_CFG_SUPPRESS_INTR_CODE */ /* ------------------ utilities for code following below ------------------- */ @@ -398,7 +400,7 @@ uchar index = rq->wIndex.bytes[0]; usbResetStall(); SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */ len = 1; -#if USB_CFG_HAVE_INTRIN_ENDPOINT +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE SWITCH_CASE(USBRQ_SET_INTERFACE) /* 11 */ usbResetDataToggling(); usbResetStall(); @@ -612,7 +614,7 @@ USB_PUBLIC void usbInit(void) #endif USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); usbResetDataToggling(); -#if USB_CFG_HAVE_INTRIN_ENDPOINT +#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE usbTxLen1 = USBPID_NAK; #if USB_CFG_HAVE_INTRIN_ENDPOINT3 usbTxLen3 = USBPID_NAK; |