diff options
Diffstat (limited to 'board/twinkie/board.h')
-rw-r--r-- | board/twinkie/board.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/board/twinkie/board.h b/board/twinkie/board.h index 69de431b45..51abd57353 100644 --- a/board/twinkie/board.h +++ b/board/twinkie/board.h @@ -16,6 +16,9 @@ /* Optional features */ #define CONFIG_STM_HWTIMER32 +#define CONFIG_USB +#define CONFIG_USB_CONSOLE + #define CONFIG_ADC #define CONFIG_BOARD_PRE_INIT #define CONFIG_I2C @@ -23,10 +26,16 @@ #undef CONFIG_WATCHDOG_HELP #undef CONFIG_LID_SWITCH #undef CONFIG_TASK_PROFILING +#undef CONFIG_DMA_DEFAULT_HANDLERS /* I2C ports configuration */ #define I2C_PORT_MASTER 0 +/* USB configuration */ +#define CONFIG_USB_PID 0x500A +/* By default, enable all console messages excepted USB */ +#define CC_DEFAULT (CC_ALL & ~CC_MASK(CC_USB)) + /* * Allow dangerous commands all the time, since we don't have a write protect * switch. @@ -49,6 +58,30 @@ enum adc_channel { /* Number of ADC channels */ ADC_CH_COUNT }; + +/* USB string indexes */ +enum usb_strings { + USB_STR_DESC = 0, + USB_STR_VENDOR, + USB_STR_PRODUCT, + USB_STR_VERSION, + USB_STR_SNIFFER, + + USB_STR_COUNT +}; + #endif /* !__ASSEMBLER__ */ +/* USB interface indexes (use define rather than enum to expand them) */ +#define USB_IFACE_CONSOLE 0 +#define USB_IFACE_VENDOR 1 +#define USB_IFACE_COUNT 2 + +/* USB endpoint indexes (use define rather than enum to expand them) */ +#define USB_EP_CONTROL 0 +#define USB_EP_CON_TX 1 +#define USB_EP_CON_RX 2 +#define USB_EP_SNIFFER 3 +#define USB_EP_COUNT 4 + #endif /* __BOARD_H */ |