Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/hic_hal/atmel/sam3u2c/usbuser.h@0:01f31e923fe2, 2020-04-07 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pawel Zarembski |
0:01f31e923fe2 | 1 | /** |
Pawel Zarembski |
0:01f31e923fe2 | 2 | * @file usbuser.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 __USBUSER_H |
Pawel Zarembski |
0:01f31e923fe2 | 23 | #define __USBUSER_H |
Pawel Zarembski |
0:01f31e923fe2 | 24 | |
Pawel Zarembski |
0:01f31e923fe2 | 25 | |
Pawel Zarembski |
0:01f31e923fe2 | 26 | /* USB Device Events Callback Functions */ |
Pawel Zarembski |
0:01f31e923fe2 | 27 | extern void USB_Power_Event(BOOL power); |
Pawel Zarembski |
0:01f31e923fe2 | 28 | extern void USB_Reset_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 29 | extern void USB_Suspend_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 30 | extern void USB_Resume_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 31 | extern void USB_WakeUp_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 32 | extern void USB_SOF_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 33 | extern void USB_Error_Event(U32 error); |
Pawel Zarembski |
0:01f31e923fe2 | 34 | |
Pawel Zarembski |
0:01f31e923fe2 | 35 | /* USB Endpoint Callback Events */ |
Pawel Zarembski |
0:01f31e923fe2 | 36 | #define USB_EVT_SETUP 1 /* Setup Packet */ |
Pawel Zarembski |
0:01f31e923fe2 | 37 | #define USB_EVT_OUT 2 /* OUT Packet */ |
Pawel Zarembski |
0:01f31e923fe2 | 38 | #define USB_EVT_IN 3 /* IN Packet */ |
Pawel Zarembski |
0:01f31e923fe2 | 39 | #define USB_EVT_OUT_NAK 4 /* OUT Packet - Not Acknowledged */ |
Pawel Zarembski |
0:01f31e923fe2 | 40 | #define USB_EVT_IN_NAK 5 /* IN Packet - Not Acknowledged */ |
Pawel Zarembski |
0:01f31e923fe2 | 41 | #define USB_EVT_OUT_STALL 6 /* OUT Packet - Stalled */ |
Pawel Zarembski |
0:01f31e923fe2 | 42 | #define USB_EVT_IN_STALL 7 /* IN Packet - Stalled */ |
Pawel Zarembski |
0:01f31e923fe2 | 43 | #define USB_EVT_OUT_DMA_EOT 8 /* DMA OUT EP - End of Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 44 | #define USB_EVT_IN_DMA_EOT 9 /* DMA IN EP - End of Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 45 | #define USB_EVT_OUT_DMA_NDR 10 /* DMA OUT EP - New Descriptor Request */ |
Pawel Zarembski |
0:01f31e923fe2 | 46 | #define USB_EVT_IN_DMA_NDR 11 /* DMA IN EP - New Descriptor Request */ |
Pawel Zarembski |
0:01f31e923fe2 | 47 | #define USB_EVT_OUT_DMA_ERR 12 /* DMA OUT EP - Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 48 | #define USB_EVT_IN_DMA_ERR 13 /* DMA IN EP - Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 49 | |
Pawel Zarembski |
0:01f31e923fe2 | 50 | /* USB Endpoint Events Callback Pointers */ |
Pawel Zarembski |
0:01f31e923fe2 | 51 | extern void (* const USB_P_EP[16])(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 52 | |
Pawel Zarembski |
0:01f31e923fe2 | 53 | /* USB Endpoint Events Callback Functions */ |
Pawel Zarembski |
0:01f31e923fe2 | 54 | extern void USB_EndPoint0(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 55 | extern void USB_EndPoint1(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 56 | extern void USB_EndPoint2(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 57 | extern void USB_EndPoint3(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 58 | extern void USB_EndPoint4(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 59 | extern void USB_EndPoint5(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 60 | extern void USB_EndPoint6(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 61 | extern void USB_EndPoint7(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 62 | extern void USB_EndPoint8(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 63 | extern void USB_EndPoint9(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 64 | extern void USB_EndPoint10(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 65 | extern void USB_EndPoint11(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 66 | extern void USB_EndPoint12(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 67 | extern void USB_EndPoint13(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 68 | extern void USB_EndPoint14(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 69 | extern void USB_EndPoint15(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 70 | |
Pawel Zarembski |
0:01f31e923fe2 | 71 | /* USB Core Events Callback Functions */ |
Pawel Zarembski |
0:01f31e923fe2 | 72 | extern void USB_Configure_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 73 | extern void USB_Interface_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 74 | extern void USB_Feature_Event(void); |
Pawel Zarembski |
0:01f31e923fe2 | 75 | |
Pawel Zarembski |
0:01f31e923fe2 | 76 | |
Pawel Zarembski |
0:01f31e923fe2 | 77 | #endif /* __USBUSER_H */ |