diff options
| author | Keith Packard <keithp@keithp.com> | 2013-12-08 11:11:41 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-12-08 11:11:41 -0800 | 
| commit | a1e4750a7d4af72e8e9086735885f48c9b56c18e (patch) | |
| tree | 0c06b11108db822285f137a2d97f585c7a5aa92b | |
| parent | 25aaf6122cbddcbc6a80460dac8ccb9f45743ae0 (diff) | |
altos: Allow products to override default 100mA USB current
This will allow products to specify their own current limit.
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rw-r--r-- | src/core/ao_product.c | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/src/core/ao_product.c b/src/core/ao_product.c index ec91b978..b9327bac 100644 --- a/src/core/ao_product.c +++ b/src/core/ao_product.c @@ -27,6 +27,12 @@ const char ao_product[] = AO_iProduct_STRING;  #define LE_WORD(x)    ((x)&0xFF),((uint8_t) (((uint16_t) (x))>>8))  #if HAS_USB + +/* Maximum power in mA */ +#ifndef AO_USB_MAX_POWER +#define AO_USB_MAX_POWER	100 +#endif +  #include "ao_usb.h"  /* USB descriptors in one giant block of bytes */  AO_ROMCONFIG_SYMBOL(0x00aa) uint8_t ao_usb_descriptors [] = @@ -55,7 +61,7 @@ AO_ROMCONFIG_SYMBOL(0x00aa) uint8_t ao_usb_descriptors [] =  	0x01,			/*  bConfigurationValue */  	0x00,			/*  iConfiguration */  	0xC0,			/*  bmAttributes */ -	0x32,			/*  bMaxPower */ +	AO_USB_MAX_POWER >> 1,	/*  bMaxPower, 2mA units */  	/* Control class interface */  	0x09, | 
