Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usb_lib.h Source File

usb_lib.h

Go to the documentation of this file.
00001 /**
00002  * @file    usb_lib.h
00003  * @brief   USB library header
00004  *
00005  * DAPLink Interface Firmware
00006  * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
00007  * SPDX-License-Identifier: Apache-2.0
00008  *
00009  * Licensed under the Apache License, Version 2.0 (the "License"); you may
00010  * not use this file except in compliance with the License.
00011  * You may obtain a copy of the License at
00012  *
00013  * http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing, software
00016  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00017  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  * See the License for the specific language governing permissions and
00019  * limitations under the License.
00020  */
00021 
00022 #ifndef __USB_LIB_H__
00023 #define __USB_LIB_H__
00024 
00025 /*------------------------------------------------------------------------------
00026  *           USB Device Configuration
00027  *----------------------------------------------------------------------------*/
00028 extern U8 USBD_AltSetting[];
00029 extern U8 USBD_EP0Buf[];
00030 extern const U8 usbd_power;
00031 extern const U8 usbd_hs_enable;
00032 extern const U8 usbd_bos_enable;
00033 extern const U16 usbd_if_num;
00034 extern const U8 usbd_ep_num;
00035 extern const U8 usbd_max_packet0;
00036 
00037 
00038 /*------------------------------------------------------------------------------
00039  *           USB Device Class Configuration
00040  *----------------------------------------------------------------------------*/
00041 extern const U8 usbd_hid_enable;
00042 extern U8 usbd_hid_if_num;
00043 extern U8 usbd_webusb_if_num;
00044 extern const U8 usbd_hid_ep_intin;
00045 extern const U8 usbd_hid_ep_intout;
00046 extern const U16 usbd_hid_interval     [2];
00047 extern const U16 usbd_hid_maxpacketsize[2];
00048 extern const U8 usbd_hid_inreport_num;
00049 extern const U8 usbd_hid_outreport_num;
00050 extern const U16 usbd_hid_inreport_max_sz;
00051 extern const U16 usbd_hid_outreport_max_sz;
00052 extern const U16 usbd_hid_featreport_max_sz;
00053 extern U16 USBD_HID_PollingCnt;
00054 extern U16 USBD_HID_PollingReload[];
00055 extern U8 USBD_HID_IdleCnt[];
00056 extern U8 USBD_HID_IdleReload[];
00057 extern U8 USBD_HID_IdleSet[];
00058 extern U8 USBD_HID_InReport[];
00059 extern U8 USBD_HID_OutReport[];
00060 extern U8 USBD_HID_FeatReport[];
00061 
00062 extern const U8 usbd_msc_enable;
00063 extern U8 usbd_msc_if_num;
00064 extern const U8 usbd_msc_ep_bulkin;
00065 extern const U8 usbd_msc_ep_bulkout;
00066 extern const U16 usbd_msc_maxpacketsize[2];
00067 extern const U8 *usbd_msc_inquiry_data;
00068 extern const U16 USBD_MSC_BulkBufSize;
00069 extern       U8 USBD_MSC_BulkBuf[];
00070 
00071 extern const U8 usbd_adc_enable;
00072 extern const U8 usbd_adc_cif_num;
00073 extern const U8 usbd_adc_sif1_num;
00074 extern const U8 usbd_adc_sif2_num;
00075 extern const U8 usbd_adc_ep_isoout;
00076 extern const U32 usbd_adc_cfg_datafreq;
00077 extern const U32 usbd_adc_cfg_p_s;
00078 extern const U32 usbd_adc_cfg_p_c;
00079 extern const U32 usbd_adc_cfg_b_s;
00080 extern       S16 USBD_ADC_DataBuf[];
00081 
00082 extern const U8 usbd_cdc_acm_enable;
00083 extern U8 usbd_cdc_acm_cif_num;
00084 extern U8 usbd_cdc_acm_dif_num;
00085 extern const U8 usbd_cdc_acm_bufsize;
00086 extern const U8 usbd_cdc_acm_ep_intin;
00087 extern const U8 usbd_cdc_acm_ep_bulkin;
00088 extern const U8 usbd_cdc_acm_ep_bulkout;
00089 extern const U16 usbd_cdc_acm_sendbuf_sz;
00090 extern const U16 usbd_cdc_acm_receivebuf_sz;
00091 extern const U16 usbd_cdc_acm_maxpacketsize[2];
00092 extern const U16 usbd_cdc_acm_maxpacketsize1[2];
00093 extern U8 USBD_CDC_ACM_SendBuf[];
00094 extern U8 USBD_CDC_ACM_ReceiveBuf[];
00095 extern U8 USBD_CDC_ACM_NotifyBuf[10];
00096 
00097 extern const U8 usbd_webusb_vendor_code;
00098 extern const U8 usbd_winusb_vendor_code;
00099 
00100 extern const U8 usbd_bulk_enable;
00101 extern U8 usbd_bulk_if_num;
00102 extern const U8 usbd_bulk_ep_bulkin;
00103 extern const U8 usbd_bulk_ep_bulkout;
00104 extern const U16 usbd_bulk_maxpacketsize[2];
00105 extern const U16 USBD_Bulk_BulkBufSize;
00106 extern       U8 USBD_Bulk_BulkInBuf[];
00107 extern       U8 USBD_Bulk_BulkOutBuf[];
00108 
00109 extern void usbd_os_evt_set(U16 event_flags, U32 task);
00110 extern U16 usbd_os_evt_get(void);
00111 extern U32 usbd_os_evt_wait_or(U16 wait_flags, U16 timeout);
00112 
00113 extern const BOOL __rtx;
00114 
00115 
00116 /*------------------------------------------------------------------------------
00117  *      USB Device Descriptors
00118  *----------------------------------------------------------------------------*/
00119 extern const U8 USBD_HID_ReportDescriptor[];
00120 extern const U16 USBD_HID_ReportDescriptorSize;
00121 extern const U16 USBD_HID_DescriptorOffset;
00122 extern const U8 USBD_DeviceDescriptor[];
00123 extern const U8 USBD_DeviceQualifier[];
00124 extern const U8 USBD_DeviceQualifier_HS[];
00125 extern U8 USBD_ConfigDescriptor[];
00126 extern U8 USBD_ConfigDescriptor_HS[];
00127 extern const U8 USBD_BinaryObjectStoreDescriptor[];
00128 extern const U8 USBD_StringDescriptor[];
00129 extern const U8 USBD_WebUSBURLDescriptor[];
00130 extern const U8 USBD_WinUSBDescriptorSetDescriptor[];
00131 
00132 #endif  /* __USB_LIB_H__ */