/* USB host abort a pipe job. 
USB host pipe abort job by freeze the pipe. */
enum status_code usb_host_pipe_abort_job(struct usb_module *module_inst, uint8_t pipe_num)
/* USB host abort a pipe job. 
USB host pipe abort job by freeze the pipe. */
enum status_code usb_host_pipe_abort_job(struct usb_module *module_inst, uint8_t pipe_num)
{
	Assert(module_inst);
	Assert(module_inst->hw);
	Assert(pipe_num < USB_PIPE_NUM);
	if (module_inst->hw->HOST.HostPipe[pipe_num].PCFG.bit.PTYPE ==
			USB_HOST_PIPE_TYPE_DISABLE) {
		return STATUS_ERR_NOT_INITIALIZED;
	}
	module_inst->hw->HOST.HostPipe[pipe_num].PSTATUSSET.reg = USB_HOST_PSTATUSSET_PFREEZE;
	host_pipe_job_busy_status &= ~(1 << pipe_num);
	return STATUS_OK;
}