Subversion Repositories DashDisplay

Rev

Blame | Last modification | View Log | Download | RSS feed

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