usb minor change
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
2013-11-12 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/usb_desc.c (usb_initial_feature): Remove.
|
||||
(USB_SELF_POWERED): Move to ...
|
||||
* src/usb_conf.h (USB_SELF_POWERED): ... here.
|
||||
* src/usb_ctrl.c (usb_cb_device_reset, usb_intr): Follow the
|
||||
change.
|
||||
|
||||
2013-11-11 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/adc_stm32f103.c (adc_wait_completion): Update from NeuG 1.0.
|
||||
|
||||
2013-11-03 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
@@ -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