mirror of https://github.com/ARMmbed/mbed-os.git
Added setup status enum and removed some old commented out code
parent
94d01a99f3
commit
1babcd1011
|
@ -77,6 +77,12 @@ private:
|
|||
USB_HW_EVENT_POWER = 2
|
||||
} usb_hw_event_type_t;
|
||||
|
||||
typedef enum usb_hw_ctrl_stage_t {
|
||||
USB_HW_CTRL_STAGE_SETUP = 0,
|
||||
USB_HW_CTRL_STAGE_DATA = 1,
|
||||
USB_HW_CTRL_STAGE_STATUS = 2
|
||||
} usb_hw_ctrl_stage_t;
|
||||
|
||||
// Event type to process
|
||||
usb_hw_event_type_t usb_event_type;
|
||||
|
||||
|
|
|
@ -280,16 +280,6 @@ void USBPhyHw::ep0_read(uint8_t *data, uint32_t size) {
|
|||
transfer->p_data.rx = data;
|
||||
transfer->size = size;
|
||||
|
||||
// if((setup_total == 1) && ((setup_buf.bmRequestType & SETUP_TRANSFER_DIR_MASK) == 0))
|
||||
// {
|
||||
// setup_remaining -= size;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Update the number of bytes remaining in the setup data stage
|
||||
// setup_remaining -= size;
|
||||
// }
|
||||
|
||||
setup_remaining -= size;
|
||||
|
||||
nrf_drv_usbd_setup_data_clear(); // tell the hardware to receive another OUT packet
|
||||
|
|
Loading…
Reference in New Issue