usb minor change
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
|
||||
#define NUM_STRING_DESC 7
|
||||
|
||||
#if defined(USB_SELF_POWERED)
|
||||
#define USB_INITIAL_FEATURE 0xC0 /* bmAttributes: self powered */
|
||||
#else
|
||||
#define USB_INITIAL_FEATURE 0x80 /* bmAttributes: bus powered */
|
||||
#endif
|
||||
|
||||
/* Control pipe */
|
||||
/* EP0: 64-byte, 64-byte */
|
||||
#define ENDP0_RXADDR (0x40)
|
||||
|
||||
@@ -182,7 +182,7 @@ usb_cb_device_reset (void)
|
||||
usb_lld_set_configuration (0);
|
||||
|
||||
/* Current Feature initialization */
|
||||
usb_lld_set_feature (usb_initial_feature);
|
||||
usb_lld_set_feature (USB_INITIAL_FEATURE);
|
||||
|
||||
usb_lld_reset ();
|
||||
|
||||
@@ -434,7 +434,7 @@ usb_intr (void *arg)
|
||||
chopstx_intr_t interrupt;
|
||||
|
||||
(void)arg;
|
||||
usb_lld_init (usb_initial_feature);
|
||||
usb_lld_init (USB_INITIAL_FEATURE);
|
||||
chopstx_claim_irq (&interrupt, INTR_REQ_USB);
|
||||
usb_interrupt_handler ();
|
||||
|
||||
|
||||
@@ -57,14 +57,6 @@ static const uint8_t gnukDeviceDescriptor[] = {
|
||||
|
||||
|
||||
|
||||
#if defined(USB_SELF_POWERED)
|
||||
#define USB_INITIAL_FEATURE 0xC0 /* bmAttributes: self powered */
|
||||
#else
|
||||
#define USB_INITIAL_FEATURE 0x80 /* bmAttributes: bus powered */
|
||||
#endif
|
||||
|
||||
const uint8_t usb_initial_feature = USB_INITIAL_FEATURE;
|
||||
|
||||
/* Configuation Descriptor */
|
||||
static const uint8_t gnukConfigDescriptor[] = {
|
||||
9, /* bLength: Configuation Descriptor size */
|
||||
|
||||
Reference in New Issue
Block a user