diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-04-20 17:30:41 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-04-20 17:30:41 +0900 |
commit | 437b2dc43ca2e9b39b7be40f41b233bbaa8f8362 (patch) | |
tree | a5f79be7bc5e7374244befe23955c700ea9407e7 /example-cdc/usb_stm32f103.c | |
parent | 3eac2459815c0826d811ed808e5d7687c03638b8 (diff) |
Update for STM32
Diffstat (limited to 'example-cdc/usb_stm32f103.c')
-rw-r--r-- | example-cdc/usb_stm32f103.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/example-cdc/usb_stm32f103.c b/example-cdc/usb_stm32f103.c index 2dac791..80fbcc7 100644 --- a/example-cdc/usb_stm32f103.c +++ b/example-cdc/usb_stm32f103.c @@ -355,7 +355,7 @@ void usb_lld_init (uint8_t feature) dev_p->state = IN_DATA; usb_lld_set_configuration (0); - usb_lld_set_feature (feature); + dev_p->current_feature = feature; /* Reset USB */ st103_set_cntr (CNTR_FRES); @@ -891,8 +891,10 @@ usb_handle_transfer (uint16_t istr_value) } } -void usb_lld_reset (void) +void usb_lld_reset (uint8_t feature) { + usb_lld_set_configuration (0); + dev_p->current_feature = feature; st103_set_btable (); st103_set_daddr (0); } @@ -999,11 +1001,6 @@ uint8_t usb_lld_current_configuration (void) return dev_p->current_configuration; } -void usb_lld_set_feature (uint8_t feature) -{ - dev_p->current_feature = feature; -} - void usb_lld_set_data_to_recv (void *p, size_t len) { data_p->addr = p; |