diff options
| author | hathach <[email protected]> | 2013-06-11 17:53:33 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-06-11 17:53:33 +0700 |
| commit | 17a27f7398c2807796432bbca5e90d97f09ae051 (patch) | |
| tree | 4352e8adbcbaab3904e992096f4d29a94946a12b /tinyusb/device/usbd.c | |
| parent | 5ae9c72f84af82e9c42ac04cdcf5f623b4677dfd (diff) | |
[lpc176x][device] pass set configure control request
Diffstat (limited to 'tinyusb/device/usbd.c')
| -rw-r--r-- | tinyusb/device/usbd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c index 58b79f7a5..426ae19aa 100644 --- a/tinyusb/device/usbd.c +++ b/tinyusb/device/usbd.c @@ -114,6 +114,7 @@ void std_get_descriptor(uint8_t coreid) break; default: +// ASSERT(false, (void) 0); // descriptors that is not supported yet return; } } @@ -131,6 +132,13 @@ void usbd_setup_received(uint8_t coreid) p_device->address = (uint8_t) p_device->setup_packet.wValue; dcd_device_set_address(coreid, p_device->address); dcd_pipe_control_write_zero_length(coreid); + usbd_devices[coreid].state = TUSB_DEVICE_STATE_ADDRESSED; + break; + + case TUSB_REQUEST_SET_CONFIGURATION: + dcd_device_set_configuration(coreid, (uint8_t) p_device->setup_packet.wValue); + dcd_pipe_control_write_zero_length(coreid); + usbd_devices[coreid].state = TUSB_DEVICE_STATE_CONFIGURED; break; default: |
