add prototype for hcd_pipe(control)_close

- update test code for enum task respectively
This commit is contained in:
hathach
2013-03-06 22:41:14 +07:00
parent 5c3bd1f8dc
commit ef08654e73
4 changed files with 15 additions and 9 deletions

View File

@@ -173,12 +173,15 @@ OSAL_TASK_DECLARE(usbh_enumeration_task)
)
);
//------------- update port info & open control pipe for new address -------------//
//------------- update port info & close control pipe of addr0 -------------//
usbh_device_info_pool[new_addr].core_id = usbh_device_info_pool[0].core_id;
usbh_device_info_pool[new_addr].hub_addr = usbh_device_info_pool[0].hub_addr;
usbh_device_info_pool[new_addr].hub_port = usbh_device_info_pool[0].hub_port;
usbh_device_info_pool[new_addr].speed = usbh_device_info_pool[0].speed;
usbh_device_info_pool[new_addr].status = TUSB_DEVICE_STATUS_ADDRESSED;
hcd_pipe_control_close(0);
// open control pipe for new address
TASK_ASSERT_STATUS ( hcd_pipe_control_open(new_addr, ((tusb_descriptor_device_t*) enum_data_buffer)->bMaxPacketSize0 ) );
//------------- Get full device descriptor -------------//