Added setup status enum and removed some old commented out code

pull/10689/head
George Beckstein 2019-02-03 06:53:19 -05:00 committed by aglass0fmilk
parent 94d01a99f3
commit 1babcd1011
2 changed files with 6 additions and 10 deletions

View File

@ -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;

View File

@ -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