1 /* 2 * Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc. 3 * Copyright 2016 NXP 4 * All rights reserved. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #ifndef _USB_HOST_CH9_H_ 10 #define _USB_HOST_CH9_H_ 11 12 /******************************************************************************* 13 * Definitions 14 ******************************************************************************/ 15 16 /*! 17 * @addtogroup usb_host_drv 18 * @{ 19 */ 20 21 /*! @}*/ 22 23 /******************************************************************************* 24 * API 25 ******************************************************************************/ 26 /*! 27 * @brief standard control transfer common code. 28 * 29 * @param deviceInstance device instance handle. 30 * @param transfer transfer. 31 * @param buffer data buffer pointer. 32 * @param bufferLen data length. 33 * 34 * @return kStatus_USB_Success or error codes. 35 */ 36 usb_status_t USB_HostCh9RequestCommon(usb_host_device_instance_t *deviceInstance, 37 usb_host_transfer_t *transfer, 38 uint8_t *buffer, 39 uint32_t bufferLen); 40 41 /*! 42 * @brief standard get status implementation. 43 * 44 * @param deviceInstance device instance handle. 45 * @param transfer transfer. 46 * @param param parameter. 47 * 48 * @return kStatus_USB_Success or error codes. 49 */ 50 usb_status_t USB_HostStandardGetStatus(usb_host_device_instance_t *deviceInstance, 51 usb_host_transfer_t *transfer, 52 void *param); 53 54 /*! 55 * @brief standard set/clear feature implementation. 56 * 57 * @param deviceInstance device instance handle. 58 * @param transfer transfer. 59 * @param param parameter. 60 * 61 * @return kStatus_USB_Success or error codes. 62 */ 63 usb_status_t USB_HostStandardSetClearFeature(usb_host_device_instance_t *deviceInstance, 64 usb_host_transfer_t *transfer, 65 void *param); 66 67 /*! 68 * @brief standard set address implementation. 69 * 70 * @param deviceInstance device instance handle. 71 * @param transfer transfer. 72 * @param param parameter. 73 * 74 * @return kStatus_USB_Success or error codes. 75 */ 76 usb_status_t USB_HostStandardSetAddress(usb_host_device_instance_t *deviceInstance, 77 usb_host_transfer_t *transfer, 78 void *param); 79 80 /*! 81 * @brief standard set/get descriptor implementation. 82 * 83 * @param deviceInstance device instance handle. 84 * @param transfer transfer. 85 * @param param parameter. 86 * 87 * @return kStatus_USB_Success or error codes. 88 */ 89 usb_status_t USB_HostStandardSetGetDescriptor(usb_host_device_instance_t *deviceInstance, 90 usb_host_transfer_t *transfer, 91 void *param); 92 93 /*! 94 * @brief standard get interface implementation. 95 * 96 * @param deviceInstance device instance handle. 97 * @param transfer transfer. 98 * @param param parameter. 99 * 100 * @return kStatus_USB_Success or error codes. 101 */ 102 usb_status_t USB_HostStandardGetInterface(usb_host_device_instance_t *deviceInstance, 103 usb_host_transfer_t *transfer, 104 void *param); 105 106 /*! 107 * @brief standard set interface implementation. 108 * 109 * @param deviceInstance device instance handle. 110 * @param transfer transfer. 111 * @param param parameter. 112 * 113 * @return kStatus_USB_Success or error codes. 114 */ 115 usb_status_t USB_HostStandardSetInterface(usb_host_device_instance_t *deviceInstance, 116 usb_host_transfer_t *transfer, 117 void *param); 118 119 /*! 120 * @brief standard sync frame implementation. 121 * 122 * @param deviceInstance device instance handle. 123 * @param transfer transfer. 124 * @param param parameter. 125 * 126 * @return kStatus_USB_Success or error codes. 127 */ 128 usb_status_t USB_HostStandardSyncFrame(usb_host_device_instance_t *deviceInstance, 129 usb_host_transfer_t *transfer, 130 void *param); 131 #endif /* _USB_HOST_CH9_H_ */ 132