Nirvana Jay / Mbed 2 deprecated F7DISCO_Demo

Dependencies:   BSP_DISCO_F746NG_patch mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usbd_conf_template.c Source File

usbd_conf_template.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    usbd_conf_template.c
00004   * @author  MCD Application Team
00005   * @version V2.4.1
00006   * @date    19-June-2015
00007   * @brief   USB Device configuration and interface file
00008   *          This template should be copied to the user folder, renamed and customized
00009   *          following user needs.  
00010   ******************************************************************************
00011   * @attention
00012   *
00013   * <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
00014   *
00015   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
00016   * You may not use this file except in compliance with the License.
00017   * You may obtain a copy of the License at:
00018   *
00019   *        http://www.st.com/software_license_agreement_liberty_v2
00020   *
00021   * Unless required by applicable law or agreed to in writing, software 
00022   * distributed under the License is distributed on an "AS IS" BASIS, 
00023   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00024   * See the License for the specific language governing permissions and
00025   * limitations under the License.
00026   *
00027   ******************************************************************************
00028   */ 
00029 
00030 /* Includes ------------------------------------------------------------------*/
00031 #include "usbd_core.h"
00032 /* Private typedef -----------------------------------------------------------*/
00033 /* Private define ------------------------------------------------------------*/
00034 /* Private macro -------------------------------------------------------------*/
00035 /* Private variables ---------------------------------------------------------*/
00036 /* Private function prototypes -----------------------------------------------*/
00037 /* Private functions ---------------------------------------------------------*/
00038 /**
00039   * @brief  Initializes the Low Level portion of the Device driver.
00040   * @param  pdev: Device handle
00041   * @retval USBD Status
00042   */
00043 USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
00044 {    
00045   return USBD_OK;
00046 }
00047 
00048 /**
00049   * @brief  De-Initializes the Low Level portion of the Device driver.
00050   * @param  pdev: Device handle
00051   * @retval USBD Status
00052   */
00053 USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
00054 {
00055   return USBD_OK;
00056 }
00057 
00058 /**
00059   * @brief  Starts the Low Level portion of the Device driver. 
00060   * @param  pdev: Device handle
00061   * @retval USBD Status
00062   */
00063 USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
00064 {
00065   return USBD_OK;
00066 }
00067 
00068 /**
00069   * @brief  Stops the Low Level portion of the Device driver.
00070   * @param  pdev: Device handle
00071   * @retval USBD Status
00072   */
00073 USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
00074 {
00075   return USBD_OK;
00076 }
00077 
00078 /**
00079   * @brief  Opens an endpoint of the Low Level Driver.
00080   * @param  pdev: Device handle
00081   * @param  ep_addr: Endpoint Number
00082   * @param  ep_type: Endpoint Type
00083   * @param  ep_mps: Endpoint Max Packet Size
00084   * @retval USBD Status
00085   */
00086 USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev,
00087                                   uint8_t ep_addr,
00088                                   uint8_t ep_type,
00089                                   uint16_t ep_mps)
00090 {
00091   return USBD_OK;
00092 }
00093 
00094 /**
00095   * @brief  Closes an endpoint of the Low Level Driver.
00096   * @param  pdev: Device handle
00097   * @param  ep_addr: Endpoint Number
00098   * @retval USBD Status
00099   */
00100 USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
00101 {
00102   return USBD_OK;
00103 }
00104 
00105 /**
00106   * @brief  Flushes an endpoint of the Low Level Driver.
00107   * @param  pdev: Device handle
00108   * @param  ep_addr: Endpoint Number
00109   * @retval USBD Status
00110   */
00111 USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
00112 {
00113   return USBD_OK;
00114 }
00115 
00116 /**
00117   * @brief  Sets a Stall condition on an endpoint of the Low Level Driver.
00118   * @param  pdev: Device handle
00119   * @param  ep_addr: Endpoint Number
00120   * @retval USBD Status
00121   */
00122 USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
00123 {
00124   return USBD_OK;
00125 }
00126 
00127 /**
00128   * @brief  Clears a Stall condition on an endpoint of the Low Level Driver.
00129   * @param  pdev: Device handle
00130   * @param  ep_addr: Endpoint Number
00131   * @retval USBD Status
00132   */
00133 USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
00134 {
00135   return USBD_OK; 
00136 }
00137 
00138 /**
00139   * @brief  Returns Stall condition.
00140   * @param  pdev: Device handle
00141   * @param  ep_addr: Endpoint Number
00142   * @retval Stall (1: Yes, 0: No)
00143   */
00144 uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
00145 {
00146    return 0;
00147 }
00148 
00149 /**
00150   * @brief  Assigns a USB address to the device.
00151   * @param  pdev: Device handle
00152   * @param  ep_addr: Endpoint Number
00153   * @retval USBD Status
00154   */
00155 USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
00156 {
00157   return USBD_OK; 
00158 }
00159 
00160 /**
00161   * @brief  Transmits data over an endpoint.
00162   * @param  pdev: Device handle
00163   * @param  ep_addr: Endpoint Number
00164   * @param  pbuf: Pointer to data to be sent
00165   * @param  size: Data size    
00166   * @retval USBD Status
00167   */
00168 USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, 
00169                                     uint8_t ep_addr,
00170                                     uint8_t *pbuf,
00171                                     uint16_t size)
00172 {
00173   return USBD_OK;
00174 }
00175 
00176 /**
00177   * @brief  Prepares an endpoint for reception.
00178   * @param  pdev: Device handle
00179   * @param  ep_addr: Endpoint Number
00180   * @param  pbuf: Pointer to data to be received
00181   * @param  size: Data size
00182   * @retval USBD Status
00183   */
00184 USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, 
00185                                           uint8_t ep_addr,
00186                                           uint8_t *pbuf,
00187                                           uint16_t size)
00188 {
00189   return USBD_OK;
00190 }
00191 
00192 /**
00193   * @brief  Returns the last transferred packet size.
00194   * @param  pdev: Device handle
00195   * @param  ep_addr: Endpoint Number
00196   * @retval Recived Data Size
00197   */
00198 uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
00199 {
00200   return 0;
00201 }
00202 
00203 /**
00204   * @brief  Delays routine for the USB Device Library.
00205   * @param  Delay: Delay in ms
00206   * @retval None
00207   */
00208 void USBD_LL_Delay(uint32_t Delay)
00209 {
00210 }
00211 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
00212