Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | /** |
| 2 | ****************************************************************************** |
||
| 3 | * @file usbd_core.h |
||
| 4 | * @author MCD Application Team |
||
| 5 | * @brief Header file for usbd_core.c file |
||
| 6 | ****************************************************************************** |
||
| 7 | * @attention |
||
| 8 | * |
||
| 9 | mjames | 9 | * <h2><center>© Copyright (c) 2015 STMicroelectronics. |
| 10 | * All rights reserved.</center></h2> |
||
| 2 | mjames | 11 | * |
| 9 | mjames | 12 | * This software component is licensed by ST under Ultimate Liberty license |
| 13 | * SLA0044, the "License"; You may not use this file except in compliance with |
||
| 14 | * the License. You may obtain a copy of the License at: |
||
| 15 | * www.st.com/SLA0044 |
||
| 2 | mjames | 16 | * |
| 17 | ****************************************************************************** |
||
| 9 | mjames | 18 | */ |
| 2 | mjames | 19 | |
| 20 | /* Define to prevent recursive inclusion -------------------------------------*/ |
||
| 21 | #ifndef __USBD_CORE_H |
||
| 22 | #define __USBD_CORE_H |
||
| 23 | |||
| 24 | #ifdef __cplusplus |
||
| 9 | mjames | 25 | extern "C" { |
| 2 | mjames | 26 | #endif |
| 27 | |||
| 28 | /* Includes ------------------------------------------------------------------*/ |
||
| 29 | #include "usbd_conf.h" |
||
| 30 | #include "usbd_def.h" |
||
| 31 | #include "usbd_ioreq.h" |
||
| 32 | #include "usbd_ctlreq.h" |
||
| 33 | |||
| 34 | /** @addtogroup STM32_USB_DEVICE_LIBRARY |
||
| 35 | * @{ |
||
| 36 | */ |
||
| 9 | mjames | 37 | |
| 2 | mjames | 38 | /** @defgroup USBD_CORE |
| 39 | * @brief This file is the Header file for usbd_core.c file |
||
| 40 | * @{ |
||
| 9 | mjames | 41 | */ |
| 2 | mjames | 42 | |
| 43 | |||
| 44 | /** @defgroup USBD_CORE_Exported_Defines |
||
| 45 | * @{ |
||
| 9 | mjames | 46 | */ |
| 47 | #ifndef USBD_DEBUG_LEVEL |
||
| 48 | #define USBD_DEBUG_LEVEL 0U |
||
| 49 | #endif /* USBD_DEBUG_LEVEL */ |
||
| 2 | mjames | 50 | /** |
| 51 | * @} |
||
| 9 | mjames | 52 | */ |
| 2 | mjames | 53 | |
| 54 | |||
| 55 | /** @defgroup USBD_CORE_Exported_TypesDefinitions |
||
| 56 | * @{ |
||
| 57 | */ |
||
| 58 | |||
| 9 | mjames | 59 | |
| 2 | mjames | 60 | /** |
| 61 | * @} |
||
| 9 | mjames | 62 | */ |
| 2 | mjames | 63 | |
| 64 | |||
| 65 | |||
| 66 | /** @defgroup USBD_CORE_Exported_Macros |
||
| 67 | * @{ |
||
| 9 | mjames | 68 | */ |
| 2 | mjames | 69 | |
| 70 | /** |
||
| 71 | * @} |
||
| 9 | mjames | 72 | */ |
| 2 | mjames | 73 | |
| 74 | /** @defgroup USBD_CORE_Exported_Variables |
||
| 75 | * @{ |
||
| 9 | mjames | 76 | */ |
| 2 | mjames | 77 | #define USBD_SOF USBD_LL_SOF |
| 78 | /** |
||
| 79 | * @} |
||
| 9 | mjames | 80 | */ |
| 2 | mjames | 81 | |
| 82 | /** @defgroup USBD_CORE_Exported_FunctionsPrototype |
||
| 83 | * @{ |
||
| 9 | mjames | 84 | */ |
| 2 | mjames | 85 | USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id); |
| 86 | USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev); |
||
| 9 | mjames | 87 | USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev); |
| 88 | USBD_StatusTypeDef USBD_Stop(USBD_HandleTypeDef *pdev); |
||
| 2 | mjames | 89 | USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass); |
| 90 | |||
| 9 | mjames | 91 | USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev); |
| 2 | mjames | 92 | USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx); |
| 93 | USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx); |
||
| 94 | |||
| 95 | USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup); |
||
| 9 | mjames | 96 | USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata); |
| 97 | USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata); |
||
| 2 | mjames | 98 | |
| 99 | USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev); |
||
| 100 | USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed); |
||
| 101 | USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev); |
||
| 102 | USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev); |
||
| 103 | |||
| 104 | USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev); |
||
| 105 | USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum); |
||
| 106 | USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum); |
||
| 107 | |||
| 108 | USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev); |
||
| 109 | USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev); |
||
| 110 | |||
| 111 | /* USBD Low Level Driver */ |
||
| 9 | mjames | 112 | USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev); |
| 113 | USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev); |
||
| 2 | mjames | 114 | USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev); |
| 9 | mjames | 115 | USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev); |
| 116 | USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, |
||
| 117 | uint8_t ep_addr, |
||
| 118 | uint8_t ep_type, |
||
| 119 | uint16_t ep_mps); |
||
| 2 | mjames | 120 | |
| 9 | mjames | 121 | USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
| 122 | USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
||
| 123 | USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
||
| 124 | USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
||
| 125 | uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
||
| 126 | USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr); |
||
| 127 | USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, |
||
| 128 | uint8_t ep_addr, |
||
| 129 | uint8_t *pbuf, |
||
| 130 | uint16_t size); |
||
| 2 | mjames | 131 | |
| 9 | mjames | 132 | USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, |
| 133 | uint8_t ep_addr, |
||
| 2 | mjames | 134 | uint8_t *pbuf, |
| 135 | uint16_t size); |
||
| 136 | |||
| 9 | mjames | 137 | uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
| 138 | void USBD_LL_Delay(uint32_t Delay); |
||
| 2 | mjames | 139 | |
| 140 | /** |
||
| 141 | * @} |
||
| 9 | mjames | 142 | */ |
| 2 | mjames | 143 | |
| 144 | #ifdef __cplusplus |
||
| 145 | } |
||
| 146 | #endif |
||
| 147 | |||
| 148 | #endif /* __USBD_CORE_H */ |
||
| 149 | |||
| 150 | /** |
||
| 151 | * @} |
||
| 9 | mjames | 152 | */ |
| 2 | mjames | 153 | |
| 154 | /** |
||
| 155 | * @} |
||
| 9 | mjames | 156 | */ |
| 2 | mjames | 157 | |
| 158 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
||
| 159 | |||
| 160 | |||
| 161 |