Functions | Variables
usbd_dfu_core.c File Reference

This file provides the high layer firmware functions to manage the following functionalities of the USB DFU Class: More...

#include "usbd_dfu_core.h"
#include "usbd_desc.h"
#include "usbd_req.h"
#include "usb_bsp.h"
Include dependency graph for usbd_dfu_core.c:

Go to the source code of this file.

Functions

static void DFU_LeaveDFUMode (void *pdev)
 DFU_LeaveDFUMode Handles the sub-protocol DFU leave DFU mode request (leaves DFU mode and resets device to jump to user loaded code). More...
 
static void DFU_Req_ABORT (void *pdev)
 DFU_Req_ABORT Handles the DFU ABORT request. More...
 
static void DFU_Req_CLRSTATUS (void *pdev)
 DFU_Req_CLRSTATUS Handles the DFU CLRSTATUS request. More...
 
static void DFU_Req_DETACH (void *pdev, USB_SETUP_REQ *req)
 DFU_Req_DETACH Handles the DFU DETACH request. More...
 
static void DFU_Req_DNLOAD (void *pdev, USB_SETUP_REQ *req)
 DFU_Req_DNLOAD Handles the DFU DNLOAD request. More...
 
static void DFU_Req_GETSTATE (void *pdev)
 DFU_Req_GETSTATE Handles the DFU GETSTATE request. More...
 
static void DFU_Req_GETSTATUS (void *pdev)
 DFU_Req_GETSTATUS Handles the DFU GETSTATUS request. More...
 
static void DFU_Req_UPLOAD (void *pdev, USB_SETUP_REQ *req)
 DFU_Req_UPLOAD Handles the DFU UPLOAD request. More...
 
static uint8_t EP0_RxReady (void *pdev)
 EP0_RxReady Handles the DFU control endpoint data OUT stage. More...
 
static uint8_t EP0_TxSent (void *pdev)
 EP0_TxSent Handles the DFU control endpoint data IN stage. More...
 
static uint8_t usbd_dfu_DeInit (void *pdev, uint8_t cfgidx)
 usbd_dfu_Init De-initializes the DFU layer. More...
 
static uint8_t * USBD_DFU_GetCfgDesc (uint8_t speed, uint16_t *length)
 USBD_DFU_GetCfgDesc Returns configuration descriptor. More...
 
static uint8_t * USBD_DFU_GetUsrStringDesc (uint8_t speed, uint8_t index, uint16_t *length)
 USBD_DFU_GetUsrStringDesc Manages the transfer of memory interfaces string descriptors. More...
 
static uint8_t usbd_dfu_Init (void *pdev, uint8_t cfgidx)
 usbd_dfu_Init Initializes the DFU interface. More...
 
static uint8_t usbd_dfu_Setup (void *pdev, USB_SETUP_REQ *req)
 usbd_dfu_Setup Handles the DFU request parsing. More...
 

Variables

__ALIGN_BEGIN uint8_t usbd_dfu_CfgDesc[USB_DFU_CONFIG_DESC_SIZ__ALIGN_END
 
uint8_t DeviceState
 
uint8_t DeviceStatus [6]
 
USBD_Class_cb_TypeDef DFU_cb
 
uint8_t MAL_Buffer []
 
uint32_t Manifest_State = Manifest_complete
 
static uint32_t Pointer = APP_DEFAULT_ADD
 
static __IO uint32_t usbd_dfu_AltSet = 0
 
const uint8_t * usbd_dfu_StringDesc []
 
static uint32_t wBlockNum = 0
 
static uint32_t wlength = 0
 

Detailed Description

This file provides the high layer firmware functions to manage the following functionalities of the USB DFU Class:

Author
MCD Application Team
Version
V1.1.0
Date
19-March-2012
  • Initialization and Configuration of high and low layer
  • Enumeration as DFU Device (and enumeration for each implemented memory interface)
  • Transfers to/from memory interfaces
  • Easy-to-customize "plug-in-like" modules for adding/removing memory interfaces.
  • Error management
*      
*          ===================================================================      
*                                DFU Class Driver Description
*          =================================================================== 
*           This driver manages the DFU class V1.1 following the "Device Class Specification for 
*           Device Firmware Upgrade Version 1.1 Aug 5, 2004".
*           This driver implements the following aspects of the specification:
*             - Device descriptor management
*             - Configuration descriptor management
*             - Enumeration as DFU device (in DFU mode only)
*             - Requests management (supporting ST DFU sub-protocol)
*             - Memory operations management (Download/Upload/Erase/Detach/GetState/GetStatus)
*             - DFU state machine implementation.
*          
*           @note
*            ST DFU sub-protocol is compliant with DFU protocol and use sub-requests to manage
*            memory addressing, commands processing, specific memories operations (ie. Erase) ...
*            As required by the DFU specification, only endpoint 0 is used in this application.
*            Other endpoints and functions may be added to the application (ie. DFU ...)
* 
*           These aspects may be enriched or modified for a specific user application.
*          
*           This driver doesn't implement the following aspects of the specification 
*           (but it is possible to manage these features with some modifications on this driver):
*             - Manifestation Tolerant mode
*      
*  
Attention

© COPYRIGHT 2012 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file usbd_dfu_core.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:53