Subversion Repositories dashGPS

Rev

Rev 16 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /**
  2.   ******************************************************************************
  3.   * @file    usbd_conf_template.c
  4.   * @author  MCD Application Team
  5.   * @brief   USB Device configuration and interface file
  6.   *          This template should be copied to the user folder,
  7.   *          renamed and customized following user needs.
  8.   ******************************************************************************
  9.   * @attention
  10.   *
  11.   * <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
  12.   * All rights reserved.</center></h2>
  13.   *
  14.   * This software component is licensed by ST under Ultimate Liberty license
  15.   * SLA0044, the "License"; You may not use this file except in compliance with
  16.   * the License. You may obtain a copy of the License at:
  17.   *                      www.st.com/SLA0044
  18.   *
  19.   ******************************************************************************
  20.   */
  21.  
  22. /* Includes ------------------------------------------------------------------*/
  23. #include "usbd_core.h"
  24. /* Private typedef -----------------------------------------------------------*/
  25. /* Private define ------------------------------------------------------------*/
  26. /* Private macro -------------------------------------------------------------*/
  27. /* Private variables ---------------------------------------------------------*/
  28. /* Private function prototypes -----------------------------------------------*/
  29. /* Private functions ---------------------------------------------------------*/
  30. /**
  31.   * @brief  Initializes the Low Level portion of the Device driver.
  32.   * @param  pdev: Device handle
  33.   * @retval USBD Status
  34.   */
  35. USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
  36. {
  37.   return USBD_OK;
  38. }
  39.  
  40. /**
  41.   * @brief  De-Initializes the Low Level portion of the Device driver.
  42.   * @param  pdev: Device handle
  43.   * @retval USBD Status
  44.   */
  45. USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
  46. {
  47.   return USBD_OK;
  48. }
  49.  
  50. /**
  51.   * @brief  Starts the Low Level portion of the Device driver.
  52.   * @param  pdev: Device handle
  53.   * @retval USBD Status
  54.   */
  55. USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
  56. {
  57.   return USBD_OK;
  58. }
  59.  
  60. /**
  61.   * @brief  Stops the Low Level portion of the Device driver.
  62.   * @param  pdev: Device handle
  63.   * @retval USBD Status
  64.   */
  65. USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
  66. {
  67.   return USBD_OK;
  68. }
  69.  
  70. /**
  71.   * @brief  Opens an endpoint of the Low Level Driver.
  72.   * @param  pdev: Device handle
  73.   * @param  ep_addr: Endpoint Number
  74.   * @param  ep_type: Endpoint Type
  75.   * @param  ep_mps: Endpoint Max Packet Size
  76.   * @retval USBD Status
  77.   */
  78. USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
  79.                                   uint8_t ep_type, uint16_t ep_mps)
  80. {
  81.   return USBD_OK;
  82. }
  83.  
  84. /**
  85.   * @brief  Closes an endpoint of the Low Level Driver.
  86.   * @param  pdev: Device handle
  87.   * @param  ep_addr: Endpoint Number
  88.   * @retval USBD Status
  89.   */
  90. USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  91. {
  92.   return USBD_OK;
  93. }
  94.  
  95. /**
  96.   * @brief  Flushes an endpoint of the Low Level Driver.
  97.   * @param  pdev: Device handle
  98.   * @param  ep_addr: Endpoint Number
  99.   * @retval USBD Status
  100.   */
  101. USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  102. {
  103.   return USBD_OK;
  104. }
  105.  
  106. /**
  107.   * @brief  Sets a Stall condition on an endpoint of the Low Level Driver.
  108.   * @param  pdev: Device handle
  109.   * @param  ep_addr: Endpoint Number
  110.   * @retval USBD Status
  111.   */
  112. USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  113. {
  114.   return USBD_OK;
  115. }
  116.  
  117. /**
  118.   * @brief  Clears a Stall condition on an endpoint of the Low Level Driver.
  119.   * @param  pdev: Device handle
  120.   * @param  ep_addr: Endpoint Number
  121.   * @retval USBD Status
  122.   */
  123. USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev,
  124.                                         uint8_t ep_addr)
  125. {
  126.   return USBD_OK;
  127. }
  128.  
  129. /**
  130.   * @brief  Returns Stall condition.
  131.   * @param  pdev: Device handle
  132.   * @param  ep_addr: Endpoint Number
  133.   * @retval Stall (1: Yes, 0: No)
  134.   */
  135. uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  136. {
  137.   return 0;
  138. }
  139.  
  140. /**
  141.   * @brief  Assigns a USB address to the device.
  142.   * @param  pdev: Device handle
  143.   * @param  ep_addr: Endpoint Number
  144.   * @retval USBD Status
  145.   */
  146. USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev,
  147.                                          uint8_t dev_addr)
  148. {
  149.   return USBD_OK;
  150. }
  151.  
  152. /**
  153.   * @brief  Transmits data over an endpoint.
  154.   * @param  pdev: Device handle
  155.   * @param  ep_addr: Endpoint Number
  156.   * @param  pbuf: Pointer to data to be sent
  157.   * @param  size: Data size
  158.   * @retval USBD Status
  159.   */
  160. USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
  161.                                     uint8_t *pbuf, uint16_t size)
  162. {
  163.   return USBD_OK;
  164. }
  165.  
  166. /**
  167.   * @brief  Prepares an endpoint for reception.
  168.   * @param  pdev: Device handle
  169.   * @param  ep_addr: Endpoint Number
  170.   * @param  pbuf: Pointer to data to be received
  171.   * @param  size: Data size
  172.   * @retval USBD Status
  173.   */
  174. USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev,
  175.                                           uint8_t ep_addr, uint8_t *pbuf,
  176.                                           uint16_t size)
  177. {
  178.   return USBD_OK;
  179. }
  180.  
  181. /**
  182.   * @brief  Returns the last transferred packet size.
  183.   * @param  pdev: Device handle
  184.   * @param  ep_addr: Endpoint Number
  185.   * @retval Recived Data Size
  186.   */
  187. uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
  188. {
  189.   return 0U;
  190. }
  191.  
  192. /**
  193.   * @brief  Delays routine for the USB Device Library.
  194.   * @param  Delay: Delay in ms
  195.   * @retval None
  196.   */
  197. void USBD_LL_Delay(uint32_t Delay)
  198. {
  199. }
  200. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  201.  
  202.