1
0
Fork 0
forked from forks/qmk_firmware

Merge pull request #955 from askreet/powerDrawPerKeyboard

Allow power consumption to be set per-keyboard.
This commit is contained in:
Jack Humbert 2016-12-15 00:02:19 -05:00 committed by GitHub
commit 2ba7f38bf4
2 changed files with 6 additions and 1 deletions

View file

@ -56,6 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
#define USB_MAX_POWER_CONSUMPTION 50
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.

View file

@ -40,6 +40,9 @@
#include "report.h" #include "report.h"
#include "descriptor.h" #include "descriptor.h"
#ifndef USB_MAX_POWER_CONSUMPTION
#define USB_MAX_POWER_CONSUMPTION 500
#endif
/******************************************************************************* /*******************************************************************************
* HID Report Descriptors * HID Report Descriptors
@ -294,7 +297,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP),
.MaxPowerConsumption = USB_CONFIG_POWER_MA(500) .MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION)
}, },
/* /*