Ejemplo n.º 1
0
/*FUNCTION*-------------------------------------------------------------
*
*  Function Name  : _usb_device_deinit_endpoint
*  Returned Value : USB_OK or error code
*  Comments       :
*  Disables the endpoint and the data structures associated with the
*  endpoint
*
*END*-----------------------------------------------------------------*/
uint8_t _usb_device_deinit_endpoint(
					 /* [IN] the USB_USB_dev_initialize state structure */
					 _usb_device_handle handle,
					 /* [IN] the Endpoint number */
					 uint8_t ep_num,
					 /* [IN] Direction */
					 uint8_t direction)
{				/* Body */
	uint8_t error = 0;

#ifdef _DEVICE_DEBUG_
	DEBUG_LOG_TRACE("_usb_device_deinit_endpoint");
#endif

	USB_device_lock();

	error = _usb_dci_vusb20_deinit_endpoint(handle, ep_num, direction);

	USB_device_unlock();

#ifdef _DEVICE_DEBUG_
	DEBUG_LOG_TRACE("_usb_device_deinit_endpoint,SUCCESSFUL");
#endif

	return error;
}				/* EndBody */
Ejemplo n.º 2
0
/*FUNCTION*-------------------------------------------------------------
*
*  Function Name  : _usb_device_deinit_endpoint
*  Returned Value : USB_OK or error code
*  Comments       :
*  Disables the endpoint and the data structures associated with the 
*  endpoint
*
*END*-----------------------------------------------------------------*/
uint_8 _usb_device_deinit_endpoint
   (
      /* [IN] the USB_USB_dev_initialize state structure */
      _usb_device_handle         handle,
            
      /* [IN] the Endpoint number */
      uint_8                    ep_num,
            
      /* [IN] Direction */
      uint_8                    direction
   )
{ /* Body */
   int                          lockKey;
   uint_8                       error = 0;
   lockKey = USB_lock();

   error = _usb_dci_vusb20_deinit_endpoint(handle, ep_num, direction);
   
   USB_unlock(lockKey);
   
   return error;
} /* EndBody */