Embedded SDK
Embedded SDK
Functions | Variables
usbd_conf.c File Reference

: This file implements the board support package for the USB device library More...

#include "os_io_seproxyhal.h"
#include "os_helpers.h"
#include "usbd_def.h"
#include "usbd_core.h"
Include dependency graph for usbd_conf.c:

Go to the source code of this file.

Functions

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, uint16_t size)
 Prepares an endpoint for reception. More...
 

Variables

unsigned int ep_in_stall
 
unsigned int ep_out_stall
 

Detailed Description

: This file implements the board support package for the USB device library

COPYRIGHT(c) 2015 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.
  3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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

◆ 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
pdevDevice handle
ep_addrEndpoint Number
Return values
USBDStatus

Definition at line 235 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
pdevDevice handle
ep_addrEndpoint Number
Return values
USBDStatus

Definition at line 173 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
pdevDevice handle
Return values
USBDStatus

Definition at line 63 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
pdevDevice handle
ep_addrEndpoint Number
Return values
USBDStatus

Definition at line 195 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
pdevDevice handle
Return values
USBDStatus

Definition at line 50 of file usbd_conf.c.

◆ USBD_LL_IsStallEP()

uint8_t USBD_LL_IsStallEP ( USBD_HandleTypeDef *  pdev,
uint8_t  ep_addr 
)

Returns Stall condition.

Parameters
pdevDevice handle
ep_addrEndpoint Number
Return values
Stall(1: Yes, 0: No)

Definition at line 261 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
pdevDevice handle
ep_addrEndpoint Number
ep_typeEndpoint Type
ep_mpsEndpoint Max Packet Size
Return values
USBDStatus

Definition at line 130 of file usbd_conf.c.

◆ USBD_LL_PrepareReceive()

USBD_StatusTypeDef USBD_LL_PrepareReceive ( USBD_HandleTypeDef *  pdev,
uint8_t  ep_addr,
uint16_t  size 
)

Prepares an endpoint for reception.

Parameters
pdevDevice handle
ep_addrEndpoint Number
pbufPointer to data to be received
sizeData size
Return values
USBDStatus

Definition at line 326 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
pdevDevice handle
ep_addrEndpoint Number
Return values
USBDStatus

Definition at line 279 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
pdevDevice handle
ep_addrEndpoint Number
Return values
USBDStatus

Definition at line 209 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
pdevDevice handle
Return values
USBDStatus

Definition at line 83 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
pdevDevice handle
Return values
USBDStatus

Definition at line 110 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
pdevDevice handle
ep_addrEndpoint Number
pbufPointer to data to be sent
sizeData size
Return values
USBDStatus

Definition at line 300 of file usbd_conf.c.

Variable Documentation

◆ ep_in_stall

unsigned int ep_in_stall

Definition at line 43 of file usbd_conf.c.

◆ ep_out_stall

unsigned int ep_out_stall

Definition at line 44 of file usbd_conf.c.