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 usbcfg_SAM3U.h
Pawel Zarembski 0:01f31e923fe2 3 * @brief
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 __USBCFG_H_SAM3U
Pawel Zarembski 0:01f31e923fe2 23 #define __USBCFG_H_SAM3U
Pawel Zarembski 0:01f31e923fe2 24
Pawel Zarembski 0:01f31e923fe2 25
Pawel Zarembski 0:01f31e923fe2 26 //*** <<< Use Configuration Wizard in Context Menu >>> ***
Pawel Zarembski 0:01f31e923fe2 27
Pawel Zarembski 0:01f31e923fe2 28
Pawel Zarembski 0:01f31e923fe2 29 /*
Pawel Zarembski 0:01f31e923fe2 30 // <h> USB Configuration
Pawel Zarembski 0:01f31e923fe2 31 // <o0> USB Power
Pawel Zarembski 0:01f31e923fe2 32 // <i> Default Power Setting
Pawel Zarembski 0:01f31e923fe2 33 // <0=> Bus-powered
Pawel Zarembski 0:01f31e923fe2 34 // <1=> Self-powered
Pawel Zarembski 0:01f31e923fe2 35 // <o1> Max Number of Interfaces <1-256>
Pawel Zarembski 0:01f31e923fe2 36 // <o2> Max Number of Endpoints <1-32>
Pawel Zarembski 0:01f31e923fe2 37 // <o3> Max Endpoint 0 Packet Size
Pawel Zarembski 0:01f31e923fe2 38 // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes
Pawel Zarembski 0:01f31e923fe2 39 // </h>
Pawel Zarembski 0:01f31e923fe2 40 */
Pawel Zarembski 0:01f31e923fe2 41
Pawel Zarembski 0:01f31e923fe2 42 #define USB_POWER 1
Pawel Zarembski 0:01f31e923fe2 43 #define USB_IF_NUM 1
Pawel Zarembski 0:01f31e923fe2 44 #define USB_EP_NUM 3
Pawel Zarembski 0:01f31e923fe2 45 #define USB_MAX_PACKET0 64
Pawel Zarembski 0:01f31e923fe2 46
Pawel Zarembski 0:01f31e923fe2 47
Pawel Zarembski 0:01f31e923fe2 48 /*
Pawel Zarembski 0:01f31e923fe2 49 // <h> USB Event Handlers
Pawel Zarembski 0:01f31e923fe2 50 // <h> Device Events
Pawel Zarembski 0:01f31e923fe2 51 // <o0.0> Power Event
Pawel Zarembski 0:01f31e923fe2 52 // <o1.0> Reset Event
Pawel Zarembski 0:01f31e923fe2 53 // <o2.0> Suspend Event
Pawel Zarembski 0:01f31e923fe2 54 // <o3.0> Resume Event
Pawel Zarembski 0:01f31e923fe2 55 // <o4.0> Remote Wakeup Event
Pawel Zarembski 0:01f31e923fe2 56 // <o5.0> Start of Frame Event
Pawel Zarembski 0:01f31e923fe2 57 // <o6.0> Error Event
Pawel Zarembski 0:01f31e923fe2 58 // </h>
Pawel Zarembski 0:01f31e923fe2 59 // <h> Endpoint Events
Pawel Zarembski 0:01f31e923fe2 60 // <o7.0> Endpoint 0 Event
Pawel Zarembski 0:01f31e923fe2 61 // <o7.1> Endpoint 1 Event
Pawel Zarembski 0:01f31e923fe2 62 // <o7.2> Endpoint 2 Event
Pawel Zarembski 0:01f31e923fe2 63 // <o7.3> Endpoint 3 Event
Pawel Zarembski 0:01f31e923fe2 64 // <o7.4> Endpoint 4 Event
Pawel Zarembski 0:01f31e923fe2 65 // <o7.5> Endpoint 5 Event
Pawel Zarembski 0:01f31e923fe2 66 // <o7.6> Endpoint 6 Event
Pawel Zarembski 0:01f31e923fe2 67
Pawel Zarembski 0:01f31e923fe2 68 // </h>
Pawel Zarembski 0:01f31e923fe2 69 // <h> USB Core Events
Pawel Zarembski 0:01f31e923fe2 70 // <o8.0> Set Configuration Event
Pawel Zarembski 0:01f31e923fe2 71 // <o9.0> Set Interface Event
Pawel Zarembski 0:01f31e923fe2 72 // <o10.0> Set/Clear Feature Event
Pawel Zarembski 0:01f31e923fe2 73 // </h>
Pawel Zarembski 0:01f31e923fe2 74 // </h>
Pawel Zarembski 0:01f31e923fe2 75 */
Pawel Zarembski 0:01f31e923fe2 76
Pawel Zarembski 0:01f31e923fe2 77 #define USB_POWER_EVENT 0
Pawel Zarembski 0:01f31e923fe2 78 #define USB_RESET_EVENT 1
Pawel Zarembski 0:01f31e923fe2 79 #define USB_SUSPEND_EVENT 1
Pawel Zarembski 0:01f31e923fe2 80 #define USB_RESUME_EVENT 1
Pawel Zarembski 0:01f31e923fe2 81 #define USB_WAKEUP_EVENT 0
Pawel Zarembski 0:01f31e923fe2 82 #define USB_SOF_EVENT 0
Pawel Zarembski 0:01f31e923fe2 83 #define USB_ERROR_EVENT 0
Pawel Zarembski 0:01f31e923fe2 84 #define USB_EP_EVENT 0x0007
Pawel Zarembski 0:01f31e923fe2 85 #define USB_CONFIGURE_EVENT 1
Pawel Zarembski 0:01f31e923fe2 86 #define USB_INTERFACE_EVENT 0
Pawel Zarembski 0:01f31e923fe2 87 #define USB_FEATURE_EVENT 0
Pawel Zarembski 0:01f31e923fe2 88
Pawel Zarembski 0:01f31e923fe2 89
Pawel Zarembski 0:01f31e923fe2 90 /*
Pawel Zarembski 0:01f31e923fe2 91 // <e0> USB Class Support
Pawel Zarembski 0:01f31e923fe2 92 // <i> enables USB Class specific Requests
Pawel Zarembski 0:01f31e923fe2 93 // <e1> Human Interface Device (HID)
Pawel Zarembski 0:01f31e923fe2 94 // <o2> Interface Number <0-255>
Pawel Zarembski 0:01f31e923fe2 95 // </e>
Pawel Zarembski 0:01f31e923fe2 96 // <e3> Mass Storage
Pawel Zarembski 0:01f31e923fe2 97 // <o4> Interface Number <0-255>
Pawel Zarembski 0:01f31e923fe2 98 // </e>
Pawel Zarembski 0:01f31e923fe2 99 // <e5> Audio Device
Pawel Zarembski 0:01f31e923fe2 100 // <o6> Control Interface Number <0-255>
Pawel Zarembski 0:01f31e923fe2 101 // <o7> Streaming Interface 1 Number <0-255>
Pawel Zarembski 0:01f31e923fe2 102 // <o8> Streaming Interface 2 Number <0-255>
Pawel Zarembski 0:01f31e923fe2 103 // </e>
Pawel Zarembski 0:01f31e923fe2 104 // <e9> Communication Device
Pawel Zarembski 0:01f31e923fe2 105 // <o10> Control Interface Number <0-255>
Pawel Zarembski 0:01f31e923fe2 106 // <o11> Bulk Interface Number <0-255>
Pawel Zarembski 0:01f31e923fe2 107 // <o12> Max Communication Device Buffer Size
Pawel Zarembski 0:01f31e923fe2 108 // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes
Pawel Zarembski 0:01f31e923fe2 109 // </e>
Pawel Zarembski 0:01f31e923fe2 110 // </e>
Pawel Zarembski 0:01f31e923fe2 111 */
Pawel Zarembski 0:01f31e923fe2 112
Pawel Zarembski 0:01f31e923fe2 113 #define USB_CLASS 1
Pawel Zarembski 0:01f31e923fe2 114 #define USB_HID 0
Pawel Zarembski 0:01f31e923fe2 115 #define USB_HID_IF_NUM 0
Pawel Zarembski 0:01f31e923fe2 116 #define USB_MSC 1
Pawel Zarembski 0:01f31e923fe2 117 #define USB_MSC_IF_NUM 0
Pawel Zarembski 0:01f31e923fe2 118 #define USB_AUDIO 0
Pawel Zarembski 0:01f31e923fe2 119 #define USB_ADC_CIF_NUM 0
Pawel Zarembski 0:01f31e923fe2 120 #define USB_ADC_SIF1_NUM 1
Pawel Zarembski 0:01f31e923fe2 121 #define USB_ADC_SIF2_NUM 2
Pawel Zarembski 0:01f31e923fe2 122 #define USB_CDC 0
Pawel Zarembski 0:01f31e923fe2 123 #define USB_CDC_CIF_NUM 0
Pawel Zarembski 0:01f31e923fe2 124 #define USB_CDC_DIF_NUM 1
Pawel Zarembski 0:01f31e923fe2 125 #define USB_CDC_BUFSIZE 64
Pawel Zarembski 0:01f31e923fe2 126
Pawel Zarembski 0:01f31e923fe2 127 /*
Pawel Zarembski 0:01f31e923fe2 128 // <e0> USB Vendor Support
Pawel Zarembski 0:01f31e923fe2 129 // <i> enables USB Vendor specific Requests
Pawel Zarembski 0:01f31e923fe2 130 // </e>
Pawel Zarembski 0:01f31e923fe2 131 */
Pawel Zarembski 0:01f31e923fe2 132 #define USB_VENDOR 0
Pawel Zarembski 0:01f31e923fe2 133
Pawel Zarembski 0:01f31e923fe2 134
Pawel Zarembski 0:01f31e923fe2 135 #endif /* __USBCFG_H__ */