IOTON boards API using mbed SDK - http://ioton.cc/plataforma-ton
Dependents: ton-bot_teste ton-bot_seguidor_linha ton-bot_seguidor_parede
Fork of IOTON-API by
usbd_core.h@3:9c7195d31602, 2017-06-29 (annotated)
- Committer:
- krebyy
- Date:
- Thu Jun 29 20:20:49 2017 +0000
- Revision:
- 3:9c7195d31602
- Parent:
- 1:3a73d77c2cef
Update to TON Board V1.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
krebyy | 1:3a73d77c2cef | 1 | /** |
krebyy | 1:3a73d77c2cef | 2 | ****************************************************************************** |
krebyy | 1:3a73d77c2cef | 3 | * @file usbd_core.h |
krebyy | 1:3a73d77c2cef | 4 | * @author MCD Application Team |
krebyy | 1:3a73d77c2cef | 5 | * @version V2.3.0 |
krebyy | 1:3a73d77c2cef | 6 | * @date 04-November-2014 |
krebyy | 1:3a73d77c2cef | 7 | * @brief Header file for usbd_core.c file |
krebyy | 1:3a73d77c2cef | 8 | ****************************************************************************** |
krebyy | 1:3a73d77c2cef | 9 | * @attention |
krebyy | 1:3a73d77c2cef | 10 | * |
krebyy | 1:3a73d77c2cef | 11 | * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> |
krebyy | 1:3a73d77c2cef | 12 | * |
krebyy | 1:3a73d77c2cef | 13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); |
krebyy | 1:3a73d77c2cef | 14 | * You may not use this file except in compliance with the License. |
krebyy | 1:3a73d77c2cef | 15 | * You may obtain a copy of the License at: |
krebyy | 1:3a73d77c2cef | 16 | * |
krebyy | 1:3a73d77c2cef | 17 | * http://www.st.com/software_license_agreement_liberty_v2 |
krebyy | 1:3a73d77c2cef | 18 | * |
krebyy | 1:3a73d77c2cef | 19 | * Unless required by applicable law or agreed to in writing, software |
krebyy | 1:3a73d77c2cef | 20 | * distributed under the License is distributed on an "AS IS" BASIS, |
krebyy | 1:3a73d77c2cef | 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
krebyy | 1:3a73d77c2cef | 22 | * See the License for the specific language governing permissions and |
krebyy | 1:3a73d77c2cef | 23 | * limitations under the License. |
krebyy | 1:3a73d77c2cef | 24 | * |
krebyy | 1:3a73d77c2cef | 25 | ****************************************************************************** |
krebyy | 1:3a73d77c2cef | 26 | */ |
krebyy | 1:3a73d77c2cef | 27 | |
krebyy | 1:3a73d77c2cef | 28 | /* Define to prevent recursive inclusion -------------------------------------*/ |
krebyy | 1:3a73d77c2cef | 29 | #ifndef __USBD_CORE_H |
krebyy | 1:3a73d77c2cef | 30 | #define __USBD_CORE_H |
krebyy | 1:3a73d77c2cef | 31 | |
krebyy | 1:3a73d77c2cef | 32 | #ifdef __cplusplus |
krebyy | 1:3a73d77c2cef | 33 | extern "C" { |
krebyy | 1:3a73d77c2cef | 34 | #endif |
krebyy | 1:3a73d77c2cef | 35 | |
krebyy | 1:3a73d77c2cef | 36 | /* Includes ------------------------------------------------------------------*/ |
krebyy | 1:3a73d77c2cef | 37 | #include "usbd_conf.h" |
krebyy | 1:3a73d77c2cef | 38 | #include "usbd_def.h" |
krebyy | 1:3a73d77c2cef | 39 | #include "usbd_ioreq.h" |
krebyy | 1:3a73d77c2cef | 40 | #include "usbd_ctlreq.h" |
krebyy | 1:3a73d77c2cef | 41 | |
krebyy | 1:3a73d77c2cef | 42 | /** @addtogroup STM32_USB_DEVICE_LIBRARY |
krebyy | 1:3a73d77c2cef | 43 | * @{ |
krebyy | 1:3a73d77c2cef | 44 | */ |
krebyy | 1:3a73d77c2cef | 45 | |
krebyy | 1:3a73d77c2cef | 46 | /** @defgroup USBD_CORE |
krebyy | 1:3a73d77c2cef | 47 | * @brief This file is the Header file for usbd_core.c file |
krebyy | 1:3a73d77c2cef | 48 | * @{ |
krebyy | 1:3a73d77c2cef | 49 | */ |
krebyy | 1:3a73d77c2cef | 50 | |
krebyy | 1:3a73d77c2cef | 51 | |
krebyy | 1:3a73d77c2cef | 52 | /** @defgroup USBD_CORE_Exported_Defines |
krebyy | 1:3a73d77c2cef | 53 | * @{ |
krebyy | 1:3a73d77c2cef | 54 | */ |
krebyy | 1:3a73d77c2cef | 55 | |
krebyy | 1:3a73d77c2cef | 56 | /** |
krebyy | 1:3a73d77c2cef | 57 | * @} |
krebyy | 1:3a73d77c2cef | 58 | */ |
krebyy | 1:3a73d77c2cef | 59 | |
krebyy | 1:3a73d77c2cef | 60 | |
krebyy | 1:3a73d77c2cef | 61 | /** @defgroup USBD_CORE_Exported_TypesDefinitions |
krebyy | 1:3a73d77c2cef | 62 | * @{ |
krebyy | 1:3a73d77c2cef | 63 | */ |
krebyy | 1:3a73d77c2cef | 64 | |
krebyy | 1:3a73d77c2cef | 65 | |
krebyy | 1:3a73d77c2cef | 66 | /** |
krebyy | 1:3a73d77c2cef | 67 | * @} |
krebyy | 1:3a73d77c2cef | 68 | */ |
krebyy | 1:3a73d77c2cef | 69 | |
krebyy | 1:3a73d77c2cef | 70 | |
krebyy | 1:3a73d77c2cef | 71 | |
krebyy | 1:3a73d77c2cef | 72 | /** @defgroup USBD_CORE_Exported_Macros |
krebyy | 1:3a73d77c2cef | 73 | * @{ |
krebyy | 1:3a73d77c2cef | 74 | */ |
krebyy | 1:3a73d77c2cef | 75 | |
krebyy | 1:3a73d77c2cef | 76 | /** |
krebyy | 1:3a73d77c2cef | 77 | * @} |
krebyy | 1:3a73d77c2cef | 78 | */ |
krebyy | 1:3a73d77c2cef | 79 | |
krebyy | 1:3a73d77c2cef | 80 | /** @defgroup USBD_CORE_Exported_Variables |
krebyy | 1:3a73d77c2cef | 81 | * @{ |
krebyy | 1:3a73d77c2cef | 82 | */ |
krebyy | 1:3a73d77c2cef | 83 | #define USBD_SOF USBD_LL_SOF |
krebyy | 1:3a73d77c2cef | 84 | /** |
krebyy | 1:3a73d77c2cef | 85 | * @} |
krebyy | 1:3a73d77c2cef | 86 | */ |
krebyy | 1:3a73d77c2cef | 87 | |
krebyy | 1:3a73d77c2cef | 88 | /** @defgroup USBD_CORE_Exported_FunctionsPrototype |
krebyy | 1:3a73d77c2cef | 89 | * @{ |
krebyy | 1:3a73d77c2cef | 90 | */ |
krebyy | 1:3a73d77c2cef | 91 | USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id); |
krebyy | 1:3a73d77c2cef | 92 | USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 93 | USBD_StatusTypeDef USBD_Start (USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 94 | USBD_StatusTypeDef USBD_Stop (USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 95 | USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass); |
krebyy | 1:3a73d77c2cef | 96 | |
krebyy | 1:3a73d77c2cef | 97 | USBD_StatusTypeDef USBD_RunTestMode (USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 98 | USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx); |
krebyy | 1:3a73d77c2cef | 99 | USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx); |
krebyy | 1:3a73d77c2cef | 100 | |
krebyy | 1:3a73d77c2cef | 101 | USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup); |
krebyy | 1:3a73d77c2cef | 102 | USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev , uint8_t epnum, uint8_t *pdata); |
krebyy | 1:3a73d77c2cef | 103 | USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev , uint8_t epnum, uint8_t *pdata); |
krebyy | 1:3a73d77c2cef | 104 | |
krebyy | 1:3a73d77c2cef | 105 | USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 106 | USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed); |
krebyy | 1:3a73d77c2cef | 107 | USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 108 | USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 109 | |
krebyy | 1:3a73d77c2cef | 110 | USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 111 | USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum); |
krebyy | 1:3a73d77c2cef | 112 | USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum); |
krebyy | 1:3a73d77c2cef | 113 | |
krebyy | 1:3a73d77c2cef | 114 | USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 115 | USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 116 | |
krebyy | 1:3a73d77c2cef | 117 | /* USBD Low Level Driver */ |
krebyy | 1:3a73d77c2cef | 118 | USBD_StatusTypeDef USBD_LL_Init (USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 119 | USBD_StatusTypeDef USBD_LL_DeInit (USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 120 | USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 121 | USBD_StatusTypeDef USBD_LL_Stop (USBD_HandleTypeDef *pdev); |
krebyy | 1:3a73d77c2cef | 122 | USBD_StatusTypeDef USBD_LL_OpenEP (USBD_HandleTypeDef *pdev, |
krebyy | 1:3a73d77c2cef | 123 | uint8_t ep_addr, |
krebyy | 1:3a73d77c2cef | 124 | uint8_t ep_type, |
krebyy | 1:3a73d77c2cef | 125 | uint16_t ep_mps); |
krebyy | 1:3a73d77c2cef | 126 | |
krebyy | 1:3a73d77c2cef | 127 | USBD_StatusTypeDef USBD_LL_CloseEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
krebyy | 1:3a73d77c2cef | 128 | USBD_StatusTypeDef USBD_LL_FlushEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
krebyy | 1:3a73d77c2cef | 129 | USBD_StatusTypeDef USBD_LL_StallEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
krebyy | 1:3a73d77c2cef | 130 | USBD_StatusTypeDef USBD_LL_ClearStallEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
krebyy | 1:3a73d77c2cef | 131 | uint8_t USBD_LL_IsStallEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
krebyy | 1:3a73d77c2cef | 132 | USBD_StatusTypeDef USBD_LL_SetUSBAddress (USBD_HandleTypeDef *pdev, uint8_t dev_addr); |
krebyy | 1:3a73d77c2cef | 133 | USBD_StatusTypeDef USBD_LL_Transmit (USBD_HandleTypeDef *pdev, |
krebyy | 1:3a73d77c2cef | 134 | uint8_t ep_addr, |
krebyy | 1:3a73d77c2cef | 135 | uint8_t *pbuf, |
krebyy | 1:3a73d77c2cef | 136 | uint16_t size); |
krebyy | 1:3a73d77c2cef | 137 | |
krebyy | 1:3a73d77c2cef | 138 | USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, |
krebyy | 1:3a73d77c2cef | 139 | uint8_t ep_addr, |
krebyy | 1:3a73d77c2cef | 140 | uint8_t *pbuf, |
krebyy | 1:3a73d77c2cef | 141 | uint16_t size); |
krebyy | 1:3a73d77c2cef | 142 | |
krebyy | 1:3a73d77c2cef | 143 | uint32_t USBD_LL_GetRxDataSize (USBD_HandleTypeDef *pdev, uint8_t ep_addr); |
krebyy | 1:3a73d77c2cef | 144 | void USBD_LL_Delay (uint32_t Delay); |
krebyy | 1:3a73d77c2cef | 145 | |
krebyy | 1:3a73d77c2cef | 146 | /** |
krebyy | 1:3a73d77c2cef | 147 | * @} |
krebyy | 1:3a73d77c2cef | 148 | */ |
krebyy | 1:3a73d77c2cef | 149 | |
krebyy | 1:3a73d77c2cef | 150 | #ifdef __cplusplus |
krebyy | 1:3a73d77c2cef | 151 | } |
krebyy | 1:3a73d77c2cef | 152 | #endif |
krebyy | 1:3a73d77c2cef | 153 | |
krebyy | 1:3a73d77c2cef | 154 | #endif /* __USBD_CORE_H */ |
krebyy | 1:3a73d77c2cef | 155 | |
krebyy | 1:3a73d77c2cef | 156 | /** |
krebyy | 1:3a73d77c2cef | 157 | * @} |
krebyy | 1:3a73d77c2cef | 158 | */ |
krebyy | 1:3a73d77c2cef | 159 | |
krebyy | 1:3a73d77c2cef | 160 | /** |
krebyy | 1:3a73d77c2cef | 161 | * @} |
krebyy | 1:3a73d77c2cef | 162 | */ |
krebyy | 1:3a73d77c2cef | 163 | |
krebyy | 1:3a73d77c2cef | 164 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
krebyy | 1:3a73d77c2cef | 165 | |
krebyy | 1:3a73d77c2cef | 166 | |
krebyy | 1:3a73d77c2cef | 167 |