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

« Back to documentation index

Show/hide line numbers usbd_core.h Source File

usbd_core.h

Go to the documentation of this file.
00001 /**
00002  * @file    usbd_core.h
00003  * @brief   USB Device Core 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 __USBD_CORE_H__
00023 #define __USBD_CORE_H__
00024 
00025 
00026 /*--------------------------- Data structures --------------------------------*/
00027 
00028 /* USB Device Core Endpoint Data Structure */
00029 typedef struct _USBD_EP_DATA {
00030     U8 *pData;
00031     U16 Count;
00032 } USBD_EP_DATA;
00033 
00034 
00035 /*--------------------------- Global variables -------------------------------*/
00036 
00037 /* USB Device Core Global Variables */
00038 extern U16 USBD_DeviceStatus;
00039 extern U8 USBD_DeviceAddress;
00040 extern U8 USBD_Configuration;
00041 extern U32 USBD_EndPointMask;
00042 extern U32 USBD_EndPointHalt;
00043 extern U32 USBD_EndPointStall;
00044 extern U8 USBD_NumInterfaces;
00045 extern U8 USBD_HighSpeed;
00046 extern U8 USBD_ZLP;
00047 
00048 extern USBD_EP_DATA USBD_EP0Data;
00049 extern USB_SETUP_PACKET USBD_SetupPacket;
00050 
00051 #ifdef __RTX
00052 extern OS_TID USBD_RTX_DevTask;
00053 extern OS_TID USBD_RTX_EPTask[];
00054 extern OS_TID USBD_RTX_CoreTask;
00055 #endif
00056 
00057 /*--------------------------- Functions exported to class specific files -----*/
00058 
00059 extern void USBD_SetupStage(void);
00060 extern void USBD_DataInStage(void);
00061 extern void USBD_DataOutStage(void);
00062 extern void USBD_StatusInStage(void);
00063 extern void USBD_StatusOutStage(void);
00064 
00065 
00066 /*--------------------------- Event handling routines ------------------------*/
00067 
00068 extern void usbd_class_init(void);
00069 extern void USBD_EndPoint0(U32 event);
00070 
00071 #ifdef __RTX
00072 extern void USBD_RTX_EndPoint0(void);
00073 #endif
00074 
00075 #endif  /* __USBD_CORE_H__ */