projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
src
/
core
/
ao_product.c
diff --git
a/src/core/ao_product.c
b/src/core/ao_product.c
index f79922f5ab8bdc52c2037a10b6f3ecc586b3a812..b9327bacbf8b4a9543775c335cefd63ab97becfc 100644
(file)
--- a/
src/core/ao_product.c
+++ b/
src/core/ao_product.c
@@
-27,9
+27,15
@@
const char ao_product[] = AO_iProduct_STRING;
#define LE_WORD(x) ((x)&0xFF),((uint8_t) (((uint16_t) (x))>>8))
#if HAS_USB
#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 */
#include "ao_usb.h"
/* USB descriptors in one giant block of bytes */
-
__code __at
(0x00aa) uint8_t ao_usb_descriptors [] =
+
AO_ROMCONFIG_SYMBOL
(0x00aa) uint8_t ao_usb_descriptors [] =
{
/* Device descriptor */
0x12,
{
/* Device descriptor */
0x12,
@@
-55,7
+61,7
@@
__code __at(0x00aa) uint8_t ao_usb_descriptors [] =
0x01, /* bConfigurationValue */
0x00, /* iConfiguration */
0xC0, /* bmAttributes */
0x01, /* bConfigurationValue */
0x00, /* iConfiguration */
0xC0, /* bmAttributes */
-
0x32, /* bMaxPower
*/
+
AO_USB_MAX_POWER >> 1, /* bMaxPower, 2mA units
*/
/* Control class interface */
0x09,
/* Control class interface */
0x09,
@@
-100,7
+106,7
@@
__code __at(0x00aa) uint8_t ao_usb_descriptors [] =
AO_USB_INT_EP|0x80, /* bEndpointAddress */
0x03, /* bmAttributes = intr */
LE_WORD(8), /* wMaxPacketSize */
AO_USB_INT_EP|0x80, /* bEndpointAddress */
0x03, /* bmAttributes = intr */
LE_WORD(8), /* wMaxPacketSize */
- 0x
0A
, /* bInterval */
+ 0x
ff
, /* bInterval */
/* Data class interface descriptor */
0x09,
/* Data class interface descriptor */
0x09,