Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/usb/usbd_event.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 usbd_event.h |
Pawel Zarembski |
0:01f31e923fe2 | 3 | * @brief USB Device Event 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 __USBD_EVENT_H__ |
Pawel Zarembski |
0:01f31e923fe2 | 23 | #define __USBD_EVENT_H__ |
Pawel Zarembski |
0:01f31e923fe2 | 24 | |
Pawel Zarembski |
0:01f31e923fe2 | 25 | |
Pawel Zarembski |
0:01f31e923fe2 | 26 | /* USB Device - Device Events */ |
Pawel Zarembski |
0:01f31e923fe2 | 27 | #define USBD_EVT_POWER_ON (1 << 0) /* USB Power On */ |
Pawel Zarembski |
0:01f31e923fe2 | 28 | #define USBD_EVT_POWER_OFF (1 << 1) /* USB Power Off */ |
Pawel Zarembski |
0:01f31e923fe2 | 29 | #define USBD_EVT_RESET (1 << 2) /* USB Bus Reset */ |
Pawel Zarembski |
0:01f31e923fe2 | 30 | #define USBD_EVT_WAKEUP (1 << 3) /* USB Remote Wakeup */ |
Pawel Zarembski |
0:01f31e923fe2 | 31 | #define USBD_EVT_SUSPEND (1 << 4) /* USB Suspend */ |
Pawel Zarembski |
0:01f31e923fe2 | 32 | #define USBD_EVT_RESUME (1 << 5) /* USB Resume */ |
Pawel Zarembski |
0:01f31e923fe2 | 33 | #define USBD_EVT_SOF (1 << 6) /* USB Start of Frame */ |
Pawel Zarembski |
0:01f31e923fe2 | 34 | #define USBD_EVT_ERROR (1 << 7) /* USB Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 35 | |
Pawel Zarembski |
0:01f31e923fe2 | 36 | /* USB Device - Endpoint Events */ |
Pawel Zarembski |
0:01f31e923fe2 | 37 | #define USBD_EVT_SETUP (1 << 1) /* Setup Packet */ |
Pawel Zarembski |
0:01f31e923fe2 | 38 | #define USBD_EVT_OUT (1 << 2) /* OUT Packet */ |
Pawel Zarembski |
0:01f31e923fe2 | 39 | #define USBD_EVT_IN (1 << 3) /* IN Packet */ |
Pawel Zarembski |
0:01f31e923fe2 | 40 | #define USBD_EVT_OUT_NAK (1 << 4) /* OUT Packet - Not Acknowledged */ |
Pawel Zarembski |
0:01f31e923fe2 | 41 | #define USBD_EVT_IN_NAK (1 << 5) /* IN Packet - Not Acknowledged */ |
Pawel Zarembski |
0:01f31e923fe2 | 42 | #define USBD_EVT_OUT_STALL (1 << 6) /* OUT Packet - Stalled */ |
Pawel Zarembski |
0:01f31e923fe2 | 43 | #define USBD_EVT_IN_STALL (1 << 7) /* IN Packet - Stalled */ |
Pawel Zarembski |
0:01f31e923fe2 | 44 | #define USBD_EVT_OUT_DMA_EOT (1 << 8) /* DMA OUT EP - End of Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 45 | #define USBD_EVT_IN_DMA_EOT (1 << 9) /* DMA IN EP - End of Transfer */ |
Pawel Zarembski |
0:01f31e923fe2 | 46 | #define USBD_EVT_OUT_DMA_NDR (1 << 10) /* DMA OUT EP - New Descriptor Request*/ |
Pawel Zarembski |
0:01f31e923fe2 | 47 | #define USBD_EVT_IN_DMA_NDR (1 << 11) /* DMA IN EP - New Descriptor Request*/ |
Pawel Zarembski |
0:01f31e923fe2 | 48 | #define USBD_EVT_OUT_DMA_ERR (1 << 12) /* DMA OUT EP - Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 49 | #define USBD_EVT_IN_DMA_ERR (1 << 13) /* DMA IN EP - Error */ |
Pawel Zarembski |
0:01f31e923fe2 | 50 | |
Pawel Zarembski |
0:01f31e923fe2 | 51 | /* USB Device - Core Events */ |
Pawel Zarembski |
0:01f31e923fe2 | 52 | #define USBD_EVT_SET_CFG (1 << 0) /* Set Configuration */ |
Pawel Zarembski |
0:01f31e923fe2 | 53 | #define USBD_EVT_SET_IF (1 << 1) /* Set Interface */ |
Pawel Zarembski |
0:01f31e923fe2 | 54 | #define USBD_EVT_SET_FEATURE (1 << 2) /* Set Feature */ |
Pawel Zarembski |
0:01f31e923fe2 | 55 | #define USBD_EVT_CLR_FEATURE (1 << 3) /* Clear Feature */ |
Pawel Zarembski |
0:01f31e923fe2 | 56 | |
Pawel Zarembski |
0:01f31e923fe2 | 57 | /* USB Device - Device Events Callback Pointers */ |
Pawel Zarembski |
0:01f31e923fe2 | 58 | extern void (* const USBD_P_Power_Event)(BOOL power); |
Pawel Zarembski |
0:01f31e923fe2 | 59 | extern void (* const USBD_P_Reset_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 60 | extern void (* const USBD_P_Suspend_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 61 | extern void (* const USBD_P_Resume_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 62 | extern void (* const USBD_P_WakeUp_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 63 | extern void (* const USBD_P_SOF_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 64 | extern void (* const USBD_P_Error_Event)(U32 error); |
Pawel Zarembski |
0:01f31e923fe2 | 65 | |
Pawel Zarembski |
0:01f31e923fe2 | 66 | /* USB Device - Endpoint Events Callback Pointers */ |
Pawel Zarembski |
0:01f31e923fe2 | 67 | extern void (* const USBD_P_EP[16])(U32 event); |
Pawel Zarembski |
0:01f31e923fe2 | 68 | |
Pawel Zarembski |
0:01f31e923fe2 | 69 | /* USB Device - Core Events Callback Pointers */ |
Pawel Zarembski |
0:01f31e923fe2 | 70 | extern void (* const USBD_P_Configure_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 71 | extern void (* const USBD_P_Interface_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 72 | extern void (* const USBD_P_Feature_Event)(void); |
Pawel Zarembski |
0:01f31e923fe2 | 73 | |
Pawel Zarembski |
0:01f31e923fe2 | 74 | /* USB Device - RTX version RTX tasks initialization */ |
Pawel Zarembski |
0:01f31e923fe2 | 75 | extern void USBD_RTX_TaskInit(void); |
Pawel Zarembski |
0:01f31e923fe2 | 76 | |
Pawel Zarembski |
0:01f31e923fe2 | 77 | #endif /* __USBD_EVENT_H__ */ |