summaryrefslogtreecommitdiff
path: root/tmk_core/protocol
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-12-15 00:02:19 -0500
committerGitHub <noreply@github.com>2016-12-15 00:02:19 -0500
commit2ba7f38bf4eac506fd57e6be341b015becd96d8f (patch)
tree0243dab3adc1d32e951e7536ab4b9283e4c31dd7 /tmk_core/protocol
parent20892bf706219f19a5f9cd34abd4f772ab4ee570 (diff)
parent83e613ad239459582ae28f78b6c81535b9b138d7 (diff)
Merge pull request #955 from askreet/powerDrawPerKeyboard
Allow power consumption to be set per-keyboard.
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r--tmk_core/protocol/lufa/descriptor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tmk_core/protocol/lufa/descriptor.c b/tmk_core/protocol/lufa/descriptor.c
index bf47787d29..14d99b50bd 100644
--- a/tmk_core/protocol/lufa/descriptor.c
+++ b/tmk_core/protocol/lufa/descriptor.c
@@ -40,6 +40,9 @@
#include "report.h"
#include "descriptor.h"
+#ifndef USB_MAX_POWER_CONSUMPTION
+#define USB_MAX_POWER_CONSUMPTION 500
+#endif
/*******************************************************************************
* HID Report Descriptors
@@ -294,7 +297,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP),
- .MaxPowerConsumption = USB_CONFIG_POWER_MA(500)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION)
},
/*