资源简介
Example description
===================
This Demo provides a description of how to use the USB-FS-Device on the STM32F10xxx,
STM32F37xxx, STM32F30xxx and STM32L15xxx devices.
The STM32 device is enumerated as HID compliant device, that uses the native PC
Host USB-FS-Device HID driver.
To test the example, you need to:
1)- Start the "USB HID Demonstrator" PC applet and connect STM32 USB to PC
2)- The device should be detected and shown in the USB HID target box
3)- Press Graphic View button
4)- You can Select "use SET_FEATURE" or "use SET_REPORT" in order to use SET_REPORT request to send HID Report
for LED control
5)- Make sure that following report ID are configured: LED1 ID (0x1) , LED2 ID(0x2),
LED3 ID(0x3), LED4 ID(0x4), and BUTTON1_ID(0x5)
6)- Select Leds to switch on/off on the EVAL board => a SET_REPORT request will be sent
More details about this Demo implementation is given in the User manual
"UM0424 STM32F10xxx USB development kit", available for download from the ST
microcontrollers website: www.st.com/stm32
代码片段和文件信息
/**
******************************************************************************
* @file hw_config.c
* @author MCD Application Team
* @version V4.0.0
* @date 21-January-2013
* @brief Hardware Configuration & Setup
******************************************************************************
* @attention
*
* © COPYRIGHT 2013 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.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “hw_config.h“
#include “usb_lib.h“
#include “usb_desc.h“
#include “usb_pwr.h“
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
ErrorStatus HSEStartUpStatus;
uint32_t ADC_ConvertedValueX = 0;
uint32_t ADC_ConvertedValueX_1 = 0;
__IO uint16_t ADC1ConvertedValue = 0 ADC1ConvertedVoltage = 0 calibration_value = 0;
/* Extern variables ----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
static void IntToUnicode (uint32_t value uint8_t *pbuf uint8_t len);
/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* Function Name : Set_System
* Description : Configures Main system clocks & power.
* Input : None.
* Return : None.
*******************************************************************************/
void Set_System(void)
{
#if defined (STM32F37X) || defined (STM32F30X)
GPIO_InitTypeDef GPIO_InitStructure;
#endif /*STM32L1XX_XD */
#if defined(USB_USE_EXTERNAL_PULLUP)
GPIO_InitTypeDef GPIO_InitStructure;
#endif /* USB_USE_EXTERNAL_PULLUP */
/*!< At this stage the microcontroller clock setting is already configured
this is done through SystemInit() function which is called from startup
file (startup_stm32xxx.s) before to branch to application main.
To reconfigure the default setting of SystemInit() functio
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-01-29 21:02 Custom_HID\
目录 0 2013-01-29 21:02 Custom_HID\EWARM\
文件 221280 2013-01-22 02:27 Custom_HID\EWARM\Custom_HID.ewd
文件 193659 2013-01-22 02:27 Custom_HID\EWARM\Custom_HID.ewp
文件 904 2013-01-22 02:27 Custom_HID\EWARM\Custom_HID.eww
文件 1354 2013-01-22 02:27 Custom_HID\EWARM\stm32f10x_flash.icf
文件 1340 2013-01-22 02:27 Custom_HID\EWARM\stm32f30x_flash.icf
文件 1429 2013-01-22 02:27 Custom_HID\EWARM\stm32f37x_flash.icf
文件 1343 2013-01-22 02:27 Custom_HID\EWARM\stm32l1xx_flash.icf
目录 0 2013-01-29 21:02 Custom_HID\inc\
文件 2341 2013-01-22 02:27 Custom_HID\inc\hw_config.h
文件 8872 2013-01-22 02:27 Custom_HID\inc\platform_config.h
文件 3568 2013-01-22 02:27 Custom_HID\inc\stm32f10x_conf.h
文件 3329 2013-01-22 02:27 Custom_HID\inc\stm32f30x_conf.h
文件 3357 2013-01-22 02:27 Custom_HID\inc\stm32f37x_conf.h
文件 3288 2013-01-22 02:27 Custom_HID\inc\stm32l1xx_conf.h
文件 2241 2013-01-22 02:27 Custom_HID\inc\stm32_it.h
文件 3721 2013-01-22 02:27 Custom_HID\inc\usb_conf.h
文件 3249 2013-01-22 02:27 Custom_HID\inc\usb_desc.h
文件 2823 2013-01-22 02:27 Custom_HID\inc\usb_istr.h
文件 3358 2013-01-22 02:27 Custom_HID\inc\usb_prop.h
文件 2455 2013-01-22 02:27 Custom_HID\inc\usb_pwr.h
目录 0 2013-01-29 21:02 Custom_HID\MDK-ARM\
文件 82440 2013-01-22 02:27 Custom_HID\MDK-ARM\Custom_HID.uvopt
文件 513947 2013-01-22 02:27 Custom_HID\MDK-ARM\Custom_HID.uvproj
文件 8740 2013-01-22 02:27 Custom_HID\readme.txt
目录 0 2013-01-29 21:02 Custom_HID\RIDE\
文件 83841 2013-01-26 02:57 Custom_HID\RIDE\Custom_HID.rapp
文件 313 2013-01-26 02:57 Custom_HID\RIDE\Custom_HID.rprj
目录 0 2013-01-29 21:02 Custom_HID\src\
文件 25312 2013-01-22 02:27 Custom_HID\src\hw_config.c
............此处省略107个文件信息
- 上一篇:电子商务 后台管理模板
- 下一篇:输入框下拉筛选值效果类似百度搜索框
相关资源
- 获取USB设备的PID跟VID
- 单层、双层A型USB母口的PCB封装
- Esp8266程序基于STM32
- 74HC165 并转串 例程,带proteus仿真
- HID USB设备通讯-源代码 UsbLibrary
- mini usb B型 AD库封装
- protues下仿真红外发射电路
- 易语言USB设备控制源码
- 三鼎全站仪usb驱动
- 最完美的STM32读写I2C EEPROM驱动
- STM32掌机代码完成
- STM32掌机驱动OLED屏幕
- stm32库开发实战指南 PDF和光盘源码
- stm32 软件I2C 实验
- STM32实现printf和scanf源代码,保证能运
- AD7793 c程序
- STM32F4XX固件库之DSP库的说明
- STM32上串口与CAN的完整程序,全中断方
- STM32使用GPIO_F的0-7口的4*4矩阵按键
- 基于STM32的三轴加速度传感器代码
- 使用stm32控制彩色级联led WS2818B源程序
- STM32_PID算法源码
- STM32F103 ucLinux 开发BOOT源码
- stm32驱动ov7670 数据转BMP格式再转JPEG存
- Keil uVision4 STC库文件
- Audio_Test for STM32F4Discovery
- stm32f407+FFT浮点运算例程
- max31856官方驱动例程STM32
- 基于STM32的MFRC522射频识别源程序
- AD5422_STM32驱动程序
评论
共有 条评论