From 30473357290747be06e9200a7d9c751738a3b0a1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Nov 2019 10:21:22 +1100 Subject: [PATCH] =?UTF-8?q?Add=20support=20for=20configurable=20polling=20?= =?UTF-8?q?interval=20and=20power=20usage=20o=E2=80=A6=20(#7336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add support for custom polling interval and power usage on V-USB boards * Use 1ms as default for now --- keyboards/ares/usbconfig.h | 10 ---------- keyboards/bfake/usbconfig.h | 10 ---------- keyboards/coseyfannitutti/discipad/config.h | 1 + keyboards/coseyfannitutti/discipad/usbconfig.h | 11 ----------- keyboards/coseyfannitutti/discipline/config.h | 1 + keyboards/coseyfannitutti/discipline/usbconfig.h | 11 ----------- keyboards/donutcables/budget96/usbconfig.h | 10 ---------- keyboards/eve/meteor/usbconfig.h | 12 +----------- keyboards/exclusive/e6v2/le_bmc/usbconfig.h | 10 ---------- keyboards/exclusive/e6v2/oe_bmc/usbconfig.h | 10 ---------- keyboards/exent/usbconfig.h | 10 ---------- keyboards/facew/usbconfig.h | 10 ---------- keyboards/ft/mars80/usbconfig.h | 10 ---------- keyboards/gingham/config.h | 1 + keyboards/gingham/usbconfig.h | 11 ----------- keyboards/gray_studio/hb85/usbconfig.h | 10 ---------- keyboards/handwired/hnah40/config.h | 2 ++ keyboards/handwired/hnah40/usbconfig.h | 11 ----------- keyboards/jc65/v32a/usbconfig.h | 10 ---------- keyboards/jj40/config.h | 1 + keyboards/jj40/usbconfig.h | 11 ----------- keyboards/jj4x4/config.h | 1 + keyboards/jj4x4/usbconfig.h | 11 ----------- keyboards/jj50/usbconfig.h | 10 ---------- keyboards/kbdfans/kbdpad/mk1/usbconfig.h | 10 ---------- keyboards/mechmini/v1/usbconfig.h | 10 ---------- keyboards/mehkee96/usbconfig.h | 10 ---------- keyboards/mt40/usbconfig.h | 10 ---------- keyboards/panc60/usbconfig.h | 10 ---------- keyboards/pearl/usbconfig.h | 10 ---------- keyboards/percent/canoe/usbconfig.h | 10 ---------- keyboards/percent/skog/usbconfig.h | 10 ---------- keyboards/percent/skog_lite/usbconfig.h | 10 ---------- keyboards/plaid/config.h | 1 + keyboards/plaid/usbconfig.h | 11 ----------- keyboards/singa/usbconfig.h | 10 ---------- keyboards/tgr/alice/usbconfig.h | 10 ---------- keyboards/tgr/jane/usbconfig.h | 10 ---------- keyboards/unikorn/usbconfig.h | 10 ---------- keyboards/winkeyless/bface/usbconfig.h | 10 ---------- keyboards/winkeyless/bmini/usbconfig.h | 10 ---------- keyboards/winkeyless/bminiex/usbconfig.h | 10 ---------- keyboards/ymd75/usbconfig.h | 10 ---------- keyboards/ymd96/config.h | 1 + keyboards/ymd96/usbconfig.h | 11 ----------- keyboards/ymdk/bface/usbconfig.h | 10 ---------- keyboards/ymdk_np21/config.h | 2 ++ keyboards/ymdk_np21/usbconfig.h | 11 ----------- quantum/template/ps2avrgb/usbconfig.h | 10 ---------- tmk_core/protocol/vusb/vusb.c | 15 ++++++++++++--- 50 files changed, 24 insertions(+), 413 deletions(-) diff --git a/keyboards/ares/usbconfig.h b/keyboards/ares/usbconfig.h index 89b7ffbaa..c6e0b8f81 100644 --- a/keyboards/ares/usbconfig.h +++ b/keyboards/ares/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/bfake/usbconfig.h b/keyboards/bfake/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/bfake/usbconfig.h +++ b/keyboards/bfake/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/coseyfannitutti/discipad/config.h b/keyboards/coseyfannitutti/discipad/config.h index ffa06ee25..7fe091582 100644 --- a/keyboards/coseyfannitutti/discipad/config.h +++ b/keyboards/coseyfannitutti/discipad/config.h @@ -50,6 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/coseyfannitutti/discipad/usbconfig.h b/keyboards/coseyfannitutti/discipad/usbconfig.h index 505f0e5c8..0ae42cac8 100644 --- a/keyboards/coseyfannitutti/discipad/usbconfig.h +++ b/keyboards/coseyfannitutti/discipad/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/coseyfannitutti/discipline/config.h b/keyboards/coseyfannitutti/discipline/config.h index b3386f94d..46dd49c51 100644 --- a/keyboards/coseyfannitutti/discipline/config.h +++ b/keyboards/coseyfannitutti/discipline/config.h @@ -48,6 +48,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/coseyfannitutti/discipline/usbconfig.h b/keyboards/coseyfannitutti/discipline/usbconfig.h index f20ad2f9c..a52f1c1b2 100644 --- a/keyboards/coseyfannitutti/discipline/usbconfig.h +++ b/keyboards/coseyfannitutti/discipline/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/donutcables/budget96/usbconfig.h b/keyboards/donutcables/budget96/usbconfig.h index 223b69bb9..c290b434b 100644 --- a/keyboards/donutcables/budget96/usbconfig.h +++ b/keyboards/donutcables/budget96/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/eve/meteor/usbconfig.h b/keyboards/eve/meteor/usbconfig.h index da9b2b719..fd5d95e2e 100644 --- a/keyboards/eve/meteor/usbconfig.h +++ b/keyboards/eve/meteor/usbconfig.h @@ -98,20 +98,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -380,4 +370,4 @@ section at the end of this file). #define USB_INTR_ENABLE_BIT INT1 /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 -#define USB_INTR_VECTOR INT1_vect \ No newline at end of file +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/exclusive/e6v2/le_bmc/usbconfig.h b/keyboards/exclusive/e6v2/le_bmc/usbconfig.h index f22f2b631..30c5f55eb 100644 --- a/keyboards/exclusive/e6v2/le_bmc/usbconfig.h +++ b/keyboards/exclusive/e6v2/le_bmc/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h index f22f2b631..30c5f55eb 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h +++ b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/exent/usbconfig.h b/keyboards/exent/usbconfig.h index 9ef232f04..75f318b99 100644 --- a/keyboards/exent/usbconfig.h +++ b/keyboards/exent/usbconfig.h @@ -98,20 +98,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h index f3d663f8a..d787d76ea 100644 --- a/keyboards/facew/usbconfig.h +++ b/keyboards/facew/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/ft/mars80/usbconfig.h b/keyboards/ft/mars80/usbconfig.h index 338b67f58..12018ee3b 100644 --- a/keyboards/ft/mars80/usbconfig.h +++ b/keyboards/ft/mars80/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/gingham/config.h b/keyboards/gingham/config.h index 53601e8ca..d89120c28 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -51,6 +51,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/gingham/usbconfig.h b/keyboards/gingham/usbconfig.h index 30cdd3698..7b408693d 100644 --- a/keyboards/gingham/usbconfig.h +++ b/keyboards/gingham/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/gray_studio/hb85/usbconfig.h b/keyboards/gray_studio/hb85/usbconfig.h index c52c90ce8..725a47ac3 100644 --- a/keyboards/gray_studio/hb85/usbconfig.h +++ b/keyboards/gray_studio/hb85/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h index b7a4105d0..3d3c05fd4 100644 --- a/keyboards/handwired/hnah40/config.h +++ b/keyboards/handwired/hnah40/config.h @@ -78,6 +78,8 @@ along with this program. If not, see . */ // #define GRAVE_ESC_CTRL_OVERRIDE +#define USB_MAX_POWER_CONSUMPTION 100 + /* * Force NKRO * diff --git a/keyboards/handwired/hnah40/usbconfig.h b/keyboards/handwired/hnah40/usbconfig.h index cbd37c34d..996c4584b 100644 --- a/keyboards/handwired/hnah40/usbconfig.h +++ b/keyboards/handwired/hnah40/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/jc65/v32a/usbconfig.h b/keyboards/jc65/v32a/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/jc65/v32a/usbconfig.h +++ b/keyboards/jc65/v32a/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index c068685a4..8efbc7ba2 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -45,6 +45,7 @@ along with this program. If not, see . #define DEBOUNCE 5 #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ diff --git a/keyboards/jj40/usbconfig.h b/keyboards/jj40/usbconfig.h index ad97e7f0a..d1fb1f517 100644 --- a/keyboards/jj40/usbconfig.h +++ b/keyboards/jj40/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index 80fa07d3b..423d6653e 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -48,6 +48,7 @@ along with this program. If not, see . #define DEBOUNCE 5 #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ diff --git a/keyboards/jj4x4/usbconfig.h b/keyboards/jj4x4/usbconfig.h index a7653bde8..1a5ad4056 100644 --- a/keyboards/jj4x4/usbconfig.h +++ b/keyboards/jj4x4/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/jj50/usbconfig.h b/keyboards/jj50/usbconfig.h index 59f29d04d..0618bbca8 100644 --- a/keyboards/jj50/usbconfig.h +++ b/keyboards/jj50/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/kbdfans/kbdpad/mk1/usbconfig.h b/keyboards/kbdfans/kbdpad/mk1/usbconfig.h index 54a7d20f1..782c2ff1a 100644 --- a/keyboards/kbdfans/kbdpad/mk1/usbconfig.h +++ b/keyboards/kbdfans/kbdpad/mk1/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/mechmini/v1/usbconfig.h b/keyboards/mechmini/v1/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/mechmini/v1/usbconfig.h +++ b/keyboards/mechmini/v1/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/mehkee96/usbconfig.h b/keyboards/mehkee96/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/mehkee96/usbconfig.h +++ b/keyboards/mehkee96/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/mt40/usbconfig.h b/keyboards/mt40/usbconfig.h index 498b01fd9..797e410a5 100644 --- a/keyboards/mt40/usbconfig.h +++ b/keyboards/mt40/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/panc60/usbconfig.h b/keyboards/panc60/usbconfig.h index 54a7d20f1..782c2ff1a 100644 --- a/keyboards/panc60/usbconfig.h +++ b/keyboards/panc60/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/pearl/usbconfig.h b/keyboards/pearl/usbconfig.h index 54a7d20f1..782c2ff1a 100644 --- a/keyboards/pearl/usbconfig.h +++ b/keyboards/pearl/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/percent/canoe/usbconfig.h b/keyboards/percent/canoe/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/percent/canoe/usbconfig.h +++ b/keyboards/percent/canoe/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/percent/skog/usbconfig.h b/keyboards/percent/skog/usbconfig.h index 481d7c0b1..3fb8e46ab 100644 --- a/keyboards/percent/skog/usbconfig.h +++ b/keyboards/percent/skog/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/percent/skog_lite/usbconfig.h b/keyboards/percent/skog_lite/usbconfig.h index 54a7d20f1..782c2ff1a 100644 --- a/keyboards/percent/skog_lite/usbconfig.h +++ b/keyboards/percent/skog_lite/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h index 9da31d700..8fa8aa85b 100644 --- a/keyboards/plaid/config.h +++ b/keyboards/plaid/config.h @@ -50,6 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/plaid/usbconfig.h b/keyboards/plaid/usbconfig.h index ea9fdd8ea..c505c7f66 100644 --- a/keyboards/plaid/usbconfig.h +++ b/keyboards/plaid/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/singa/usbconfig.h b/keyboards/singa/usbconfig.h index 54a7d20f1..782c2ff1a 100644 --- a/keyboards/singa/usbconfig.h +++ b/keyboards/singa/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/tgr/alice/usbconfig.h b/keyboards/tgr/alice/usbconfig.h index df7a88e3a..8d6cbe016 100644 --- a/keyboards/tgr/alice/usbconfig.h +++ b/keyboards/tgr/alice/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/tgr/jane/usbconfig.h b/keyboards/tgr/jane/usbconfig.h index 54a7d20f1..782c2ff1a 100644 --- a/keyboards/tgr/jane/usbconfig.h +++ b/keyboards/tgr/jane/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/unikorn/usbconfig.h b/keyboards/unikorn/usbconfig.h index 41ce167a8..29a3bd06e 100644 --- a/keyboards/unikorn/usbconfig.h +++ b/keyboards/unikorn/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/winkeyless/bface/usbconfig.h b/keyboards/winkeyless/bface/usbconfig.h index 192d80d91..2109bb14d 100644 --- a/keyboards/winkeyless/bface/usbconfig.h +++ b/keyboards/winkeyless/bface/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/winkeyless/bmini/usbconfig.h b/keyboards/winkeyless/bmini/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/winkeyless/bmini/usbconfig.h +++ b/keyboards/winkeyless/bmini/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/winkeyless/bminiex/usbconfig.h b/keyboards/winkeyless/bminiex/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/winkeyless/bminiex/usbconfig.h +++ b/keyboards/winkeyless/bminiex/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/ymd75/usbconfig.h b/keyboards/ymd75/usbconfig.h index 73afb18e6..271ab70dc 100644 --- a/keyboards/ymd75/usbconfig.h +++ b/keyboards/ymd75/usbconfig.h @@ -109,20 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 58169196b..25cf19ac4 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -42,6 +42,7 @@ along with this program. If not, see . #define TAPPING_TOGGLE 3 #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 /* RGB underglow */ // The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. diff --git a/keyboards/ymd96/usbconfig.h b/keyboards/ymd96/usbconfig.h index a90a36f08..a218829a6 100644 --- a/keyboards/ymd96/usbconfig.h +++ b/keyboards/ymd96/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/ymdk/bface/usbconfig.h b/keyboards/ymdk/bface/usbconfig.h index c9d0fe4d9..24191f5e3 100644 --- a/keyboards/ymdk/bface/usbconfig.h +++ b/keyboards/ymdk/bface/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 5982b6c53..30ba40081 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -41,6 +41,8 @@ along with this program. If not, see . #define NO_UART 1 +#define USB_MAX_POWER_CONSUMPTION 100 + /* RGB underglow */ // The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. // The same pin is used on the JJ40, at least. diff --git a/keyboards/ymdk_np21/usbconfig.h b/keyboards/ymdk_np21/usbconfig.h index ad97e7f0a..d1fb1f517 100644 --- a/keyboards/ymdk_np21/usbconfig.h +++ b/keyboards/ymdk_np21/usbconfig.h @@ -109,21 +109,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -// max power draw with maxed white underglow measured at 120 mA (peaks) -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/quantum/template/ps2avrgb/usbconfig.h b/quantum/template/ps2avrgb/usbconfig.h index 9ef232f04..75f318b99 100644 --- a/quantum/template/ps2avrgb/usbconfig.h +++ b/quantum/template/ps2avrgb/usbconfig.h @@ -98,20 +98,10 @@ section at the end of this file). * (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 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 3719b7aa0..72445e00b 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -345,6 +345,15 @@ const PROGMEM uchar mouse_hid_report[] = { 0xc0, // END_COLLECTION }; +#ifndef USB_MAX_POWER_CONSUMPTION +# define USB_MAX_POWER_CONSUMPTION 500 +#endif + +// TODO: change this to 10ms to match LUFA +#ifndef USB_POLLING_INTERVAL_MS +# define USB_POLLING_INTERVAL_MS 1 +#endif + /* * Descriptor for compite device: Keyboard + Mouse * @@ -366,7 +375,7 @@ const PROGMEM char usbDescriptorConfiguration[] = { # else (1 << 7), /* attributes */ # endif - USB_CFG_MAX_BUS_POWER / 2, /* max USB current in 2mA units */ + USB_MAX_POWER_CONSUMPTION / 2, /* max USB current in 2mA units */ /* * Keyboard interface @@ -393,7 +402,7 @@ const PROGMEM char usbDescriptorConfiguration[] = { (char)0x81, /* IN endpoint number 1 */ 0x03, /* attrib: Interrupt endpoint */ 8, 0, /* maximum packet size */ - USB_CFG_INTR_POLL_INTERVAL, /* in ms */ + USB_POLLING_INTERVAL_MS, /* in ms */ # endif /* @@ -424,7 +433,7 @@ const PROGMEM char usbDescriptorConfiguration[] = { (char)(0x80 | USB_CFG_EP3_NUMBER), /* IN endpoint number 3 */ 0x03, /* attrib: Interrupt endpoint */ 8, 0, /* maximum packet size */ - USB_CFG_INTR_POLL_INTERVAL, /* in ms */ + USB_POLLING_INTERVAL_MS, /* in ms */ # endif }; #endif