diff options
| author | Kyle Smith <kyle.smith@acquia.com> | 2016-12-14 23:24:40 -0500 |
|---|---|---|
| committer | Kyle Smith <kyle.smith@acquia.com> | 2016-12-14 23:29:33 -0500 |
| commit | 83e613ad239459582ae28f78b6c81535b9b138d7 (patch) | |
| tree | 0243dab3adc1d32e951e7536ab4b9283e4c31dd7 | |
| parent | 20892bf706219f19a5f9cd34abd4f772ab4ee570 (diff) | |
| download | qmk_firmware-83e613ad239459582ae28f78b6c81535b9b138d7.tar.gz qmk_firmware-83e613ad239459582ae28f78b6c81535b9b138d7.zip | |
Allow power consumption to be set per-keyboard.
| -rw-r--r-- | keyboards/ergodox/ez/config.h | 2 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/descriptor.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index c2750a321..a3dc5bf15 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h | |||
| @@ -56,6 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 56 | /* Set 0 if debouncing isn't needed */ | 56 | /* Set 0 if debouncing isn't needed */ |
| 57 | #define DEBOUNCE 5 | 57 | #define DEBOUNCE 5 |
| 58 | 58 | ||
| 59 | #define USB_MAX_POWER_CONSUMPTION 50 | ||
| 60 | |||
| 59 | /* | 61 | /* |
| 60 | * Feature disable options | 62 | * Feature disable options |
| 61 | * These options are also useful to firmware size reduction. | 63 | * These options are also useful to firmware size reduction. |
diff --git a/tmk_core/protocol/lufa/descriptor.c b/tmk_core/protocol/lufa/descriptor.c index bf47787d2..14d99b50b 100644 --- a/tmk_core/protocol/lufa/descriptor.c +++ b/tmk_core/protocol/lufa/descriptor.c | |||
| @@ -40,6 +40,9 @@ | |||
| 40 | #include "report.h" | 40 | #include "report.h" |
| 41 | #include "descriptor.h" | 41 | #include "descriptor.h" |
| 42 | 42 | ||
| 43 | #ifndef USB_MAX_POWER_CONSUMPTION | ||
| 44 | #define USB_MAX_POWER_CONSUMPTION 500 | ||
| 45 | #endif | ||
| 43 | 46 | ||
| 44 | /******************************************************************************* | 47 | /******************************************************************************* |
| 45 | * HID Report Descriptors | 48 | * HID Report Descriptors |
| @@ -294,7 +297,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
| 294 | 297 | ||
| 295 | .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), | 298 | .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), |
| 296 | 299 | ||
| 297 | .MaxPowerConsumption = USB_CONFIG_POWER_MA(500) | 300 | .MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION) |
| 298 | }, | 301 | }, |
| 299 | 302 | ||
| 300 | /* | 303 | /* |
