文件名称:project4
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- 上传时间:
- 2015-04-28
- 文件大小:
- 4kb
- 下载次数:
- 0次
- 提 供 者:
- 陈**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本例程移实现SD卡虚拟U盘功能。本例程的源代码主要来自于ST的USB固件库中的范例。
程序功能有:
(1) 输入字符1,软件移除U盘设备。
(2) 输入字符2,软件重新使能U盘设备。
在工程配置中,需要添加2个固件库中用到的预编译宏:USE_USB_OTG_FS,USE_EMBEDDED_PHY
如果需要跟踪USB通信过程,可以修改2行宏定义 :
(a) usbd_usr.c 文件开头
//#define usb_printf printf 选择这行将打印调试信息到串口。
#define usb_printf(...)
(b) usbd_storage_msd.c 文件开头
//#define mass_printf printf 选择这行将打印调试信息到串口。
#define mass_printf(...)
【说明:该例程在Flash运行正常,在内部RAM 运行需要将变量定位在 0x20010000 空间,不能使用0x1000 0000空间】-This routine shift implement virtual U disk function SD card. The source for the routine mainly ST' s USB firmware library paradigm. Program features include: (1) Input Character 1, U disk device software is removed. (2) Enter the character 2, the software re-enable the U disk device. In the project configuration, you need to add two firmware library use precompiled macros: USE_USB_OTG_FS, USE_EMBEDDED_PHY USB communication process if you need to track, you can modify the 2-line macro definition: (a) at the beginning of usbd_usr.c file //# define usb_printf printf selection This line will print debug information to the serial port. beginning usbd_storage_msd.c file#define usb_printf (...) (b) //# define mass_printf printf choose this line will print debug information to the serial port.#define mass_printf (...) [Note: This routine Flash is operating normally, the internal RAM required for the operation of the variable positioning 0x20010000 space, the space can not be used 0x1000 0
程序功能有:
(1) 输入字符1,软件移除U盘设备。
(2) 输入字符2,软件重新使能U盘设备。
在工程配置中,需要添加2个固件库中用到的预编译宏:USE_USB_OTG_FS,USE_EMBEDDED_PHY
如果需要跟踪USB通信过程,可以修改2行宏定义 :
(a) usbd_usr.c 文件开头
//#define usb_printf printf 选择这行将打印调试信息到串口。
#define usb_printf(...)
(b) usbd_storage_msd.c 文件开头
//#define mass_printf printf 选择这行将打印调试信息到串口。
#define mass_printf(...)
【说明:该例程在Flash运行正常,在内部RAM 运行需要将变量定位在 0x20010000 空间,不能使用0x1000 0000空间】-This routine shift implement virtual U disk function SD card. The source for the routine mainly ST' s USB firmware library paradigm. Program features include: (1) Input Character 1, U disk device software is removed. (2) Enter the character 2, the software re-enable the U disk device. In the project configuration, you need to add two firmware library use precompiled macros: USE_USB_OTG_FS, USE_EMBEDDED_PHY USB communication process if you need to track, you can modify the 2-line macro definition: (a) at the beginning of usbd_usr.c file //# define usb_printf printf selection This line will print debug information to the serial port. beginning usbd_storage_msd.c file#define usb_printf (...) (b) //# define mass_printf printf choose this line will print debug information to the serial port.#define mass_printf (...) [Note: This routine Flash is operating normally, the internal RAM required for the operation of the variable positioning 0x20010000 space, the space can not be used 0x1000 0
(系统自动生成,下载前可以参看下载内容)
下载文件列表
project.uvproj