Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.

Upstream: https://github.com/ARMmbed/DAPLink

Committer:
Pawel Zarembski
Date:
Tue Apr 07 12:55:42 2020 +0200
Revision:
0:01f31e923fe2
hani: DAPLink with reset workaround

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pawel Zarembski 0:01f31e923fe2 1 /**
Pawel Zarembski 0:01f31e923fe2 2 * @file usb_lib.h
Pawel Zarembski 0:01f31e923fe2 3 * @brief USB library header
Pawel Zarembski 0:01f31e923fe2 4 *
Pawel Zarembski 0:01f31e923fe2 5 * DAPLink Interface Firmware
Pawel Zarembski 0:01f31e923fe2 6 * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
Pawel Zarembski 0:01f31e923fe2 7 * SPDX-License-Identifier: Apache-2.0
Pawel Zarembski 0:01f31e923fe2 8 *
Pawel Zarembski 0:01f31e923fe2 9 * Licensed under the Apache License, Version 2.0 (the "License"); you may
Pawel Zarembski 0:01f31e923fe2 10 * not use this file except in compliance with the License.
Pawel Zarembski 0:01f31e923fe2 11 * You may obtain a copy of the License at
Pawel Zarembski 0:01f31e923fe2 12 *
Pawel Zarembski 0:01f31e923fe2 13 * http://www.apache.org/licenses/LICENSE-2.0
Pawel Zarembski 0:01f31e923fe2 14 *
Pawel Zarembski 0:01f31e923fe2 15 * Unless required by applicable law or agreed to in writing, software
Pawel Zarembski 0:01f31e923fe2 16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Pawel Zarembski 0:01f31e923fe2 17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Pawel Zarembski 0:01f31e923fe2 18 * See the License for the specific language governing permissions and
Pawel Zarembski 0:01f31e923fe2 19 * limitations under the License.
Pawel Zarembski 0:01f31e923fe2 20 */
Pawel Zarembski 0:01f31e923fe2 21
Pawel Zarembski 0:01f31e923fe2 22 #ifndef __USB_LIB_H__
Pawel Zarembski 0:01f31e923fe2 23 #define __USB_LIB_H__
Pawel Zarembski 0:01f31e923fe2 24
Pawel Zarembski 0:01f31e923fe2 25 /*------------------------------------------------------------------------------
Pawel Zarembski 0:01f31e923fe2 26 * USB Device Configuration
Pawel Zarembski 0:01f31e923fe2 27 *----------------------------------------------------------------------------*/
Pawel Zarembski 0:01f31e923fe2 28 extern U8 USBD_AltSetting[];
Pawel Zarembski 0:01f31e923fe2 29 extern U8 USBD_EP0Buf[];
Pawel Zarembski 0:01f31e923fe2 30 extern const U8 usbd_power;
Pawel Zarembski 0:01f31e923fe2 31 extern const U8 usbd_hs_enable;
Pawel Zarembski 0:01f31e923fe2 32 extern const U8 usbd_bos_enable;
Pawel Zarembski 0:01f31e923fe2 33 extern const U16 usbd_if_num;
Pawel Zarembski 0:01f31e923fe2 34 extern const U8 usbd_ep_num;
Pawel Zarembski 0:01f31e923fe2 35 extern const U8 usbd_max_packet0;
Pawel Zarembski 0:01f31e923fe2 36
Pawel Zarembski 0:01f31e923fe2 37
Pawel Zarembski 0:01f31e923fe2 38 /*------------------------------------------------------------------------------
Pawel Zarembski 0:01f31e923fe2 39 * USB Device Class Configuration
Pawel Zarembski 0:01f31e923fe2 40 *----------------------------------------------------------------------------*/
Pawel Zarembski 0:01f31e923fe2 41 extern const U8 usbd_hid_enable;
Pawel Zarembski 0:01f31e923fe2 42 extern U8 usbd_hid_if_num;
Pawel Zarembski 0:01f31e923fe2 43 extern U8 usbd_webusb_if_num;
Pawel Zarembski 0:01f31e923fe2 44 extern const U8 usbd_hid_ep_intin;
Pawel Zarembski 0:01f31e923fe2 45 extern const U8 usbd_hid_ep_intout;
Pawel Zarembski 0:01f31e923fe2 46 extern const U16 usbd_hid_interval [2];
Pawel Zarembski 0:01f31e923fe2 47 extern const U16 usbd_hid_maxpacketsize[2];
Pawel Zarembski 0:01f31e923fe2 48 extern const U8 usbd_hid_inreport_num;
Pawel Zarembski 0:01f31e923fe2 49 extern const U8 usbd_hid_outreport_num;
Pawel Zarembski 0:01f31e923fe2 50 extern const U16 usbd_hid_inreport_max_sz;
Pawel Zarembski 0:01f31e923fe2 51 extern const U16 usbd_hid_outreport_max_sz;
Pawel Zarembski 0:01f31e923fe2 52 extern const U16 usbd_hid_featreport_max_sz;
Pawel Zarembski 0:01f31e923fe2 53 extern U16 USBD_HID_PollingCnt;
Pawel Zarembski 0:01f31e923fe2 54 extern U16 USBD_HID_PollingReload[];
Pawel Zarembski 0:01f31e923fe2 55 extern U8 USBD_HID_IdleCnt[];
Pawel Zarembski 0:01f31e923fe2 56 extern U8 USBD_HID_IdleReload[];
Pawel Zarembski 0:01f31e923fe2 57 extern U8 USBD_HID_IdleSet[];
Pawel Zarembski 0:01f31e923fe2 58 extern U8 USBD_HID_InReport[];
Pawel Zarembski 0:01f31e923fe2 59 extern U8 USBD_HID_OutReport[];
Pawel Zarembski 0:01f31e923fe2 60 extern U8 USBD_HID_FeatReport[];
Pawel Zarembski 0:01f31e923fe2 61
Pawel Zarembski 0:01f31e923fe2 62 extern const U8 usbd_msc_enable;
Pawel Zarembski 0:01f31e923fe2 63 extern U8 usbd_msc_if_num;
Pawel Zarembski 0:01f31e923fe2 64 extern const U8 usbd_msc_ep_bulkin;
Pawel Zarembski 0:01f31e923fe2 65 extern const U8 usbd_msc_ep_bulkout;
Pawel Zarembski 0:01f31e923fe2 66 extern const U16 usbd_msc_maxpacketsize[2];
Pawel Zarembski 0:01f31e923fe2 67 extern const U8 *usbd_msc_inquiry_data;
Pawel Zarembski 0:01f31e923fe2 68 extern const U16 USBD_MSC_BulkBufSize;
Pawel Zarembski 0:01f31e923fe2 69 extern U8 USBD_MSC_BulkBuf[];
Pawel Zarembski 0:01f31e923fe2 70
Pawel Zarembski 0:01f31e923fe2 71 extern const U8 usbd_adc_enable;
Pawel Zarembski 0:01f31e923fe2 72 extern const U8 usbd_adc_cif_num;
Pawel Zarembski 0:01f31e923fe2 73 extern const U8 usbd_adc_sif1_num;
Pawel Zarembski 0:01f31e923fe2 74 extern const U8 usbd_adc_sif2_num;
Pawel Zarembski 0:01f31e923fe2 75 extern const U8 usbd_adc_ep_isoout;
Pawel Zarembski 0:01f31e923fe2 76 extern const U32 usbd_adc_cfg_datafreq;
Pawel Zarembski 0:01f31e923fe2 77 extern const U32 usbd_adc_cfg_p_s;
Pawel Zarembski 0:01f31e923fe2 78 extern const U32 usbd_adc_cfg_p_c;
Pawel Zarembski 0:01f31e923fe2 79 extern const U32 usbd_adc_cfg_b_s;
Pawel Zarembski 0:01f31e923fe2 80 extern S16 USBD_ADC_DataBuf[];
Pawel Zarembski 0:01f31e923fe2 81
Pawel Zarembski 0:01f31e923fe2 82 extern const U8 usbd_cdc_acm_enable;
Pawel Zarembski 0:01f31e923fe2 83 extern U8 usbd_cdc_acm_cif_num;
Pawel Zarembski 0:01f31e923fe2 84 extern U8 usbd_cdc_acm_dif_num;
Pawel Zarembski 0:01f31e923fe2 85 extern const U8 usbd_cdc_acm_bufsize;
Pawel Zarembski 0:01f31e923fe2 86 extern const U8 usbd_cdc_acm_ep_intin;
Pawel Zarembski 0:01f31e923fe2 87 extern const U8 usbd_cdc_acm_ep_bulkin;
Pawel Zarembski 0:01f31e923fe2 88 extern const U8 usbd_cdc_acm_ep_bulkout;
Pawel Zarembski 0:01f31e923fe2 89 extern const U16 usbd_cdc_acm_sendbuf_sz;
Pawel Zarembski 0:01f31e923fe2 90 extern const U16 usbd_cdc_acm_receivebuf_sz;
Pawel Zarembski 0:01f31e923fe2 91 extern const U16 usbd_cdc_acm_maxpacketsize[2];
Pawel Zarembski 0:01f31e923fe2 92 extern const U16 usbd_cdc_acm_maxpacketsize1[2];
Pawel Zarembski 0:01f31e923fe2 93 extern U8 USBD_CDC_ACM_SendBuf[];
Pawel Zarembski 0:01f31e923fe2 94 extern U8 USBD_CDC_ACM_ReceiveBuf[];
Pawel Zarembski 0:01f31e923fe2 95 extern U8 USBD_CDC_ACM_NotifyBuf[10];
Pawel Zarembski 0:01f31e923fe2 96
Pawel Zarembski 0:01f31e923fe2 97 extern const U8 usbd_webusb_vendor_code;
Pawel Zarembski 0:01f31e923fe2 98 extern const U8 usbd_winusb_vendor_code;
Pawel Zarembski 0:01f31e923fe2 99
Pawel Zarembski 0:01f31e923fe2 100 extern const U8 usbd_bulk_enable;
Pawel Zarembski 0:01f31e923fe2 101 extern U8 usbd_bulk_if_num;
Pawel Zarembski 0:01f31e923fe2 102 extern const U8 usbd_bulk_ep_bulkin;
Pawel Zarembski 0:01f31e923fe2 103 extern const U8 usbd_bulk_ep_bulkout;
Pawel Zarembski 0:01f31e923fe2 104 extern const U16 usbd_bulk_maxpacketsize[2];
Pawel Zarembski 0:01f31e923fe2 105 extern const U16 USBD_Bulk_BulkBufSize;
Pawel Zarembski 0:01f31e923fe2 106 extern U8 USBD_Bulk_BulkInBuf[];
Pawel Zarembski 0:01f31e923fe2 107 extern U8 USBD_Bulk_BulkOutBuf[];
Pawel Zarembski 0:01f31e923fe2 108
Pawel Zarembski 0:01f31e923fe2 109 extern void usbd_os_evt_set(U16 event_flags, U32 task);
Pawel Zarembski 0:01f31e923fe2 110 extern U16 usbd_os_evt_get(void);
Pawel Zarembski 0:01f31e923fe2 111 extern U32 usbd_os_evt_wait_or(U16 wait_flags, U16 timeout);
Pawel Zarembski 0:01f31e923fe2 112
Pawel Zarembski 0:01f31e923fe2 113 extern const BOOL __rtx;
Pawel Zarembski 0:01f31e923fe2 114
Pawel Zarembski 0:01f31e923fe2 115
Pawel Zarembski 0:01f31e923fe2 116 /*------------------------------------------------------------------------------
Pawel Zarembski 0:01f31e923fe2 117 * USB Device Descriptors
Pawel Zarembski 0:01f31e923fe2 118 *----------------------------------------------------------------------------*/
Pawel Zarembski 0:01f31e923fe2 119 extern const U8 USBD_HID_ReportDescriptor[];
Pawel Zarembski 0:01f31e923fe2 120 extern const U16 USBD_HID_ReportDescriptorSize;
Pawel Zarembski 0:01f31e923fe2 121 extern const U16 USBD_HID_DescriptorOffset;
Pawel Zarembski 0:01f31e923fe2 122 extern const U8 USBD_DeviceDescriptor[];
Pawel Zarembski 0:01f31e923fe2 123 extern const U8 USBD_DeviceQualifier[];
Pawel Zarembski 0:01f31e923fe2 124 extern const U8 USBD_DeviceQualifier_HS[];
Pawel Zarembski 0:01f31e923fe2 125 extern U8 USBD_ConfigDescriptor[];
Pawel Zarembski 0:01f31e923fe2 126 extern U8 USBD_ConfigDescriptor_HS[];
Pawel Zarembski 0:01f31e923fe2 127 extern const U8 USBD_BinaryObjectStoreDescriptor[];
Pawel Zarembski 0:01f31e923fe2 128 extern const U8 USBD_StringDescriptor[];
Pawel Zarembski 0:01f31e923fe2 129 extern const U8 USBD_WebUSBURLDescriptor[];
Pawel Zarembski 0:01f31e923fe2 130 extern const U8 USBD_WinUSBDescriptorSetDescriptor[];
Pawel Zarembski 0:01f31e923fe2 131
Pawel Zarembski 0:01f31e923fe2 132 #endif /* __USB_LIB_H__ */