资源简介
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个文件信息
- 上一篇:电子商务 后台管理模板
- 下一篇:输入框下拉筛选值效果类似百度搜索框
相关资源
- STM32F103RC+ADC+DMA多通道采样LCD显示
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- stm32f407上的两个can发送和接收例程
- STM32 led 时钟
- STM32 2.4G通信例程
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- usb hid调试工具
- HID调试助手
- STM32蓝牙和串口程序
- USB.Over.Network.Server 注册机
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- WPF USB 网络 串口 通信软件
- stm32f030 IAP Demo(原创)
- USB转串口驱动,FT232R驱动程序,最新
- STM32基于rt_thread操作系统的SDHC卡文件
- WinCE下CP210x的驱动程序
- hidusage.h hidpi.h 等USB开发用头文件
- 38k单片机红外发送代码、keil
- NRF24L01实现51与STM32双向通讯
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
评论
共有 条评论