diff options
author | yiancar <yiangosyiangou@cytanet.com.cy> | 2020-08-16 01:07:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-15 17:07:21 -0700 |
commit | bdb53e4c043d089279d9891b68bea77614cb97ee (patch) | |
tree | e9a7ba50a29ae7f45c941d89f2578981cee6a0f4 /usbdrv/usbconfig-prototype.h | |
parent | 9a42d205eb60faca494ff4eabce8d59f0ec0fc7f (diff) | |
download | v-usb-bdb53e4c043d089279d9891b68bea77614cb97ee.tar.gz v-usb-bdb53e4c043d089279d9891b68bea77614cb97ee.tar.bz2 v-usb-bdb53e4c043d089279d9891b68bea77614cb97ee.zip |
* Added 3rd endpoint
- Added 3rd endpoint check in asmcommon. This adds 2 extra cycles to the USB routine when enabled. With 16MHz clock (most if not all qmk build use that) the routine is still within spec.
- Updated prototype.h file to add additional options.
- Simulatanius changes in QMK to follow soon
* Update usbdrv/usbdrv.c
* Update usbdrv/usbdrv.c
* Update usbdrv/usbdrv.c
* Update usbdrv/usbdrv.c
* Update usbdrv/usbdrvasm.S
Accepted to keep changes minimal
* Update usbdrv/usbdrvasm.S
Accepted to keep changes minimal
* Update usbdrv/usbdrvasm.S
Accepted to keep changes minimal
* Update usbdrv/usbdrvasm.S
Accepted to keep changes minimal
Diffstat (limited to 'usbdrv/usbconfig-prototype.h')
-rw-r--r-- | usbdrv/usbconfig-prototype.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/usbdrv/usbconfig-prototype.h b/usbdrv/usbconfig-prototype.h index 22dd9e8..43b9ba7 100644 --- a/usbdrv/usbconfig-prototype.h +++ b/usbdrv/usbconfig-prototype.h @@ -89,9 +89,19 @@ section at the end of this file). /* If the so-called endpoint 3 is used, it can now be configured to any other * endpoint number (except 0) with this macro. Default if undefined is 3. */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT4 0 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 4 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP4_NUMBER 4 +/* If the so-called endpoint 4 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 4. + */ /* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ /* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * interrupt/bulk endpoints 1, 3 and 4. Defaults to USBPID_DATA1. * Since the token is toggled BEFORE sending any data, the first packet is * sent with the oposite value of this configuration! */ @@ -104,10 +114,10 @@ section at the end of this file). #define USB_CFG_SUPPRESS_INTR_CODE 0 /* Define this to 1 if you want to declare interrupt-in endpoints, but don't * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. + * usbSetInterrupt(), usbSetInterrupt3() and usbSetInterrupt4() are omitted. + * This is useful if you need the interrupt-in endpoints in order to comply + * to an interface (e.g. HID), but never want to send any data. This option + * saves a couple of bytes in flash memory and the transmit buffers in RAM. */ #define USB_CFG_INTR_POLL_INTERVAL 10 /* If you compile a version with endpoint 1 (interrupt-in), this is the poll |