python stm32 usb bulk_[转]使用STM32CubeMX:USB大容量存储设备

本文档介绍了如何使用STM32CubeMX配置STM32微控制器作为USB大容量存储设备,包括内存管理层的详细实现和相关函数。提供了用于读写操作的函数原型和示例代码,如初始化、获取存储容量、检查设备是否就绪、读写功能等。
摘要由CSDN通过智能技术生成

/**

******************************************************************************

* @file : usbd_storage_if.c

* @brief : Memory management layer

******************************************************************************

* This notice applies to any and all portions of this file

* that are not between comment pairs USER CODE BEGIN and

* USER CODE END. Other portions of this file, whether

* inserted by the user or by software development tools

* are owned by their respective copyright owners.

*

* Copyright (c) 2017 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:

*

* 1. Redistribution 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 other

* contributors to this software may be used to endorse or promote products

* derived from this software without specific written permission.

* 4. 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.

* 5. 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.

*

*******************************************************************************/

/*Includes ------------------------------------------------------------------*/#include"usbd_storage_if.h"

/*USER CODE BEGIN INCLUDE*/

/*USER CODE END INCLUDE*/

/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY

* @{*/

/** @defgroup USBD_STORAGE

* @brief usbd core module

* @{*/

/** @defgroup USBD_STORAGE_Private_TypesDefinitio

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值