STSW-STLKT01
|
This file implements the USB Device library callbacks and MSP. More...
#include "main.h"
Go to the source code of this file.
Functions | |
void | HAL_PCD_MspInit (PCD_HandleTypeDef *hpcd) |
Initializes the PCD MSP. More... | |
void | HAL_PCD_MspDeInit (PCD_HandleTypeDef *hpcd) |
De-Initializes the PCD MSP. More... | |
void | HAL_PCD_SetupStageCallback (PCD_HandleTypeDef *hpcd) |
SetupStage callback. More... | |
void | HAL_PCD_DataOutStageCallback (PCD_HandleTypeDef *hpcd, uint8_t epnum) |
DataOut Stage callback. More... | |
void | HAL_PCD_DataInStageCallback (PCD_HandleTypeDef *hpcd, uint8_t epnum) |
DataIn Stage callback. More... | |
void | HAL_PCD_SOFCallback (PCD_HandleTypeDef *hpcd) |
SOF callback. More... | |
void | HAL_PCD_ResetCallback (PCD_HandleTypeDef *hpcd) |
Reset callback. More... | |
void | HAL_PCD_SuspendCallback (PCD_HandleTypeDef *hpcd) |
Suspend callback. More... | |
void | HAL_PCD_ResumeCallback (PCD_HandleTypeDef *hpcd) |
Resume callback. More... | |
void | HAL_PCD_ISOOUTIncompleteCallback (PCD_HandleTypeDef *hpcd, uint8_t epnum) |
ISOOUTIncomplete callback. More... | |
void | HAL_PCD_ISOINIncompleteCallback (PCD_HandleTypeDef *hpcd, uint8_t epnum) |
ISOINIncomplete callback. More... | |
void | HAL_PCD_ConnectCallback (PCD_HandleTypeDef *hpcd) |
ConnectCallback callback. More... | |
void | HAL_PCD_DisconnectCallback (PCD_HandleTypeDef *hpcd) |
Disconnect callback. More... | |
USBD_StatusTypeDef | USBD_LL_Init (USBD_HandleTypeDef *pdev) |
Initializes the Low Level portion of the Device driver. More... | |
USBD_StatusTypeDef | USBD_LL_DeInit (USBD_HandleTypeDef *pdev) |
De-Initializes the Low Level portion of the Device driver. More... | |
USBD_StatusTypeDef | USBD_LL_Start (USBD_HandleTypeDef *pdev) |
Starts the Low Level portion of the Device driver. More... | |
USBD_StatusTypeDef | USBD_LL_Stop (USBD_HandleTypeDef *pdev) |
Stops the Low Level portion of the Device driver. More... | |
USBD_StatusTypeDef | USBD_LL_OpenEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps) |
Opens an endpoint of the Low Level Driver. More... | |
USBD_StatusTypeDef | USBD_LL_CloseEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr) |
Closes an endpoint of the Low Level Driver. More... | |
USBD_StatusTypeDef | USBD_LL_FlushEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr) |
Flushes an endpoint of the Low Level Driver. More... | |
USBD_StatusTypeDef | USBD_LL_StallEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr) |
Sets a Stall condition on an endpoint of the Low Level Driver. More... | |
USBD_StatusTypeDef | USBD_LL_ClearStallEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr) |
Clears a Stall condition on an endpoint of the Low Level Driver. More... | |
uint8_t | USBD_LL_IsStallEP (USBD_HandleTypeDef *pdev, uint8_t ep_addr) |
Returns Stall condition. More... | |
USBD_StatusTypeDef | USBD_LL_SetUSBAddress (USBD_HandleTypeDef *pdev, uint8_t dev_addr) |
Assigns a USB address to the device. More... | |
USBD_StatusTypeDef | USBD_LL_Transmit (USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size) |
Transmits data over an endpoint. More... | |
USBD_StatusTypeDef | USBD_LL_PrepareReceive (USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size) |
Prepares an endpoint for reception. More... | |
uint32_t | USBD_LL_GetRxDataSize (USBD_HandleTypeDef *pdev, uint8_t ep_addr) |
Returns the last transfered packet size. More... | |
void | USBD_LL_Delay (uint32_t Delay) |
Delays routine for the USB Device Library. More... | |
Variables | |
PCD_HandleTypeDef | hpcd |
Detailed Description
This file implements the USB Device library callbacks and MSP.
- Author
- MCD Application Team
- Version
- V1.3.0
- Date
- 29-January-2016
- Attention
© Copyright (c) 2016 STMicroelectronics International N.V. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:
- Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of STMicroelectronics nor the names of other contributors to this software may be used to endorse or promote products derived from this software without specific written permission.
- This software, including modifications and/or derivative works of this software, must execute solely and exclusively on microcontroller or microprocessor devices manufactured by or for STMicroelectronics.
- Redistribution and use of this software other than as permitted under this license is void and will automatically terminate your rights under this license.
THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file usbd_conf.c.
Function Documentation
◆ HAL_PCD_ConnectCallback()
void HAL_PCD_ConnectCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
ConnectCallback callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 214 of file usbd_conf.c.
◆ HAL_PCD_DataInStageCallback()
void HAL_PCD_DataInStageCallback | ( | PCD_HandleTypeDef * | hpcd, |
uint8_t | epnum | ||
) |
DataIn Stage callback.
- Parameters
-
hpcd PCD handle epnum Endpoint Number
- Return values
-
None
Definition at line 138 of file usbd_conf.c.
◆ HAL_PCD_DataOutStageCallback()
void HAL_PCD_DataOutStageCallback | ( | PCD_HandleTypeDef * | hpcd, |
uint8_t | epnum | ||
) |
DataOut Stage callback.
- Parameters
-
hpcd PCD handle epnum Endpoint Number
- Return values
-
None
Definition at line 127 of file usbd_conf.c.
◆ HAL_PCD_DisconnectCallback()
void HAL_PCD_DisconnectCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
Disconnect callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 224 of file usbd_conf.c.
◆ HAL_PCD_ISOINIncompleteCallback()
void HAL_PCD_ISOINIncompleteCallback | ( | PCD_HandleTypeDef * | hpcd, |
uint8_t | epnum | ||
) |
ISOINIncomplete callback.
- Parameters
-
hpcd PCD handle epnum Endpoint Number
- Return values
-
None
Definition at line 204 of file usbd_conf.c.
◆ HAL_PCD_ISOOUTIncompleteCallback()
void HAL_PCD_ISOOUTIncompleteCallback | ( | PCD_HandleTypeDef * | hpcd, |
uint8_t | epnum | ||
) |
ISOOUTIncomplete callback.
- Parameters
-
hpcd PCD handle epnum Endpoint Number
- Return values
-
None
Definition at line 193 of file usbd_conf.c.
◆ HAL_PCD_MspDeInit()
void HAL_PCD_MspDeInit | ( | PCD_HandleTypeDef * | hpcd | ) |
De-Initializes the PCD MSP.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 100 of file usbd_conf.c.
◆ HAL_PCD_MspInit()
void HAL_PCD_MspInit | ( | PCD_HandleTypeDef * | hpcd | ) |
Initializes the PCD MSP.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 69 of file usbd_conf.c.
◆ HAL_PCD_ResetCallback()
void HAL_PCD_ResetCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
Reset callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 158 of file usbd_conf.c.
◆ HAL_PCD_ResumeCallback()
void HAL_PCD_ResumeCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
Resume callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 182 of file usbd_conf.c.
◆ HAL_PCD_SetupStageCallback()
void HAL_PCD_SetupStageCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
SetupStage callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 116 of file usbd_conf.c.
◆ HAL_PCD_SOFCallback()
void HAL_PCD_SOFCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
SOF callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 148 of file usbd_conf.c.
◆ HAL_PCD_SuspendCallback()
void HAL_PCD_SuspendCallback | ( | PCD_HandleTypeDef * | hpcd | ) |
Suspend callback.
- Parameters
-
hpcd PCD handle
- Return values
-
None
Definition at line 172 of file usbd_conf.c.
◆ USBD_LL_ClearStallEP()
USBD_StatusTypeDef USBD_LL_ClearStallEP | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr | ||
) |
Clears a Stall condition on an endpoint of the Low Level Driver.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
USBD Status
Definition at line 363 of file usbd_conf.c.
◆ USBD_LL_CloseEP()
USBD_StatusTypeDef USBD_LL_CloseEP | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr | ||
) |
Closes an endpoint of the Low Level Driver.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
USBD Status
Definition at line 327 of file usbd_conf.c.
◆ USBD_LL_DeInit()
USBD_StatusTypeDef USBD_LL_DeInit | ( | USBD_HandleTypeDef * | pdev | ) |
De-Initializes the Low Level portion of the Device driver.
- Parameters
-
pdev Device handle
- Return values
-
USBD Status
Definition at line 272 of file usbd_conf.c.
◆ USBD_LL_Delay()
void USBD_LL_Delay | ( | uint32_t | Delay | ) |
Delays routine for the USB Device Library.
- Parameters
-
Delay Delay in ms
- Return values
-
None
Definition at line 451 of file usbd_conf.c.
◆ USBD_LL_FlushEP()
USBD_StatusTypeDef USBD_LL_FlushEP | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr | ||
) |
Flushes an endpoint of the Low Level Driver.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
USBD Status
Definition at line 339 of file usbd_conf.c.
◆ USBD_LL_GetRxDataSize()
uint32_t USBD_LL_GetRxDataSize | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr | ||
) |
Returns the last transfered packet size.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
Recived Data Size
Definition at line 441 of file usbd_conf.c.
◆ USBD_LL_Init()
USBD_StatusTypeDef USBD_LL_Init | ( | USBD_HandleTypeDef * | pdev | ) |
Initializes the Low Level portion of the Device driver.
- Parameters
-
pdev Device handle
- Return values
-
USBD Status
Definition at line 239 of file usbd_conf.c.
◆ USBD_LL_IsStallEP()
uint8_t USBD_LL_IsStallEP | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr | ||
) |
Returns Stall condition.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
Stall (1: Yes, 0: No)
Definition at line 375 of file usbd_conf.c.
◆ USBD_LL_OpenEP()
USBD_StatusTypeDef USBD_LL_OpenEP | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr, | ||
uint8_t | ep_type, | ||
uint16_t | ep_mps | ||
) |
Opens an endpoint of the Low Level Driver.
- Parameters
-
pdev Device handle ep_addr Endpoint Number ep_type Endpoint Type ep_mps Endpoint Max Packet Size
- Return values
-
USBD Status
Definition at line 308 of file usbd_conf.c.
◆ USBD_LL_PrepareReceive()
USBD_StatusTypeDef USBD_LL_PrepareReceive | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr, | ||
uint8_t * | pbuf, | ||
uint16_t | size | ||
) |
Prepares an endpoint for reception.
- Parameters
-
pdev Device handle ep_addr Endpoint Number pbuf Pointer to data to be received size Data size
- Return values
-
USBD Status
Definition at line 426 of file usbd_conf.c.
◆ USBD_LL_SetUSBAddress()
USBD_StatusTypeDef USBD_LL_SetUSBAddress | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | dev_addr | ||
) |
Assigns a USB address to the device.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
USBD Status
Definition at line 395 of file usbd_conf.c.
◆ USBD_LL_StallEP()
USBD_StatusTypeDef USBD_LL_StallEP | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr | ||
) |
Sets a Stall condition on an endpoint of the Low Level Driver.
- Parameters
-
pdev Device handle ep_addr Endpoint Number
- Return values
-
USBD Status
Definition at line 351 of file usbd_conf.c.
◆ USBD_LL_Start()
USBD_StatusTypeDef USBD_LL_Start | ( | USBD_HandleTypeDef * | pdev | ) |
Starts the Low Level portion of the Device driver.
- Parameters
-
pdev Device handle
- Return values
-
USBD Status
Definition at line 283 of file usbd_conf.c.
◆ USBD_LL_Stop()
USBD_StatusTypeDef USBD_LL_Stop | ( | USBD_HandleTypeDef * | pdev | ) |
Stops the Low Level portion of the Device driver.
- Parameters
-
pdev Device handle
- Return values
-
USBD Status
Definition at line 294 of file usbd_conf.c.
◆ USBD_LL_Transmit()
USBD_StatusTypeDef USBD_LL_Transmit | ( | USBD_HandleTypeDef * | pdev, |
uint8_t | ep_addr, | ||
uint8_t * | pbuf, | ||
uint16_t | size | ||
) |
Transmits data over an endpoint.
- Parameters
-
pdev Device handle ep_addr Endpoint Number pbuf Pointer to data to be sent size Data size
- Return values
-
USBD Status
Definition at line 409 of file usbd_conf.c.
Generated by
