/*FUNCTION*------------------------------------------------------------- * * Function Name : _usb_device_read_setup_data * Returned Value : USB_OK or error code * Comments : * Reads the setup data from the hardware * *END*-----------------------------------------------------------------*/ void _usb_device_read_setup_data ( /* [IN] the USB_USB_dev_initialize state structure */ _usb_device_handle handle, /* [IN] the Endpoint number */ uint_8 ep_num, /* [IN] buffer for receiving Setup packet */ uchar_ptr buff_ptr ) { /* Body */ USB_DEV_STATE_STRUCT_PTR usb_dev_ptr; #ifdef _DEVICE_DEBUG_ DEBUG_LOG_TRACE("_usb_device_read_setup_data"); #endif usb_dev_ptr = (USB_DEV_STATE_STRUCT_PTR)handle; _usb_dci_vusb20_get_setup_data(handle, ep_num, buff_ptr); #ifdef _DEVICE_DEBUG_ DEBUG_LOG_TRACE("_usb_device_read_setup_data, SUCCESSFUL"); #endif } /* EndBody */
/*FUNCTION*------------------------------------------------------------- * * Function Name : _usb_device_read_setup_data * Returned Value : USB_OK or error code * Comments : * Reads the setup data from the hardware * *END*-----------------------------------------------------------------*/ void _usb_device_read_setup_data ( /* [IN] the USB_USB_dev_initialize state structure */ _usb_device_handle handle, /* [IN] the Endpoint number */ uint_8 ep_num, /* [IN] buffer for receiving Setup packet */ uint_8_ptr buff_ptr ) { /* Body */ int lockKey; lockKey = USB_lock(); _usb_dci_vusb20_get_setup_data(handle, ep_num, buff_ptr); USB_unlock(lockKey); } /* EndBody */