Custom_HID_Test

所属分类:单片机开发
开发工具:C/C++
文件大小:4791KB
下载次数:1
上传日期:2019-02-10 21:33:22
上 传 者bigapple88
说明:  用于测试USB HID通讯协议,在STM32平台上实现设备枚举,后续添加接收发送数据功能
(this program is used for USB HID communication test, based on STM32 platform. The code has implemented initial process of usb communication in HID protocal.)

文件列表:
src\hw_config.c (26293, 2019-01-31)
src\main.c (4684, 2019-02-10)
src\stm32_it.c (14696, 2019-01-31)
src\system_stm32f10x.c (30493, 2017-06-16)
src\system_stm32f30x.c (15012, 2017-06-16)
src\system_stm32f37x.c (14926, 2017-06-16)
src\system_stm32l1xx.c (21130, 2017-06-16)
src\usb_desc.c (14551, 2017-06-16)
src\usb_endp.c (4768, 2017-06-16)
src\usb_istr.c (7774, 2017-06-16)
src\usb_prop.c (17599, 2017-06-16)
src\usb_pwr.c (10586, 2019-01-31)
SW4STM32\startup_stm32f10x_hd.s (12724, 2017-05-12)
SW4STM32\startup_stm32f10x_md.s (10407, 2017-05-12)
SW4STM32\startup_stm32f10x_xl.s (13387, 2017-05-12)
SW4STM32\startup_stm32f303xc.s (12965, 2017-05-12)
SW4STM32\startup_stm32f303xe.s (13780, 2017-05-12)
SW4STM32\startup_stm32f37x.s (12571, 2017-05-12)
SW4STM32\startup_stm32l1xx_hd.s (12061, 2017-05-12)
SW4STM32\startup_stm32l1xx_md.s (10734, 2017-05-12)
SW4STM32\STM3210B-EVAL\.cproject (13101, 2017-05-12)
SW4STM32\STM3210B-EVAL\.project (15539, 2017-05-12)
SW4STM32\STM3210B-EVAL\STM3210B-EVAL_Custom.cfg (371, 2017-05-12)
SW4STM32\STM3210B-EVAL\stm3210b-eval_custom.xml (477, 2017-05-12)
SW4STM32\STM3210B-EVAL\STM32F103VBTx_FLASH.ld (4589, 2017-05-12)
SW4STM32\STM3210E-EVAL\.cproject (13069, 2017-05-12)
SW4STM32\STM3210E-EVAL\.project (15539, 2017-05-12)
SW4STM32\STM3210E-EVAL\STM3210E-EVAL_HD.cfg (368, 2017-05-12)
SW4STM32\STM3210E-EVAL\stm3210e-eval_hd.xml (469, 2017-05-12)
SW4STM32\STM3210E-EVAL\STM32F103ZETx_FLASH.ld (4589, 2017-05-12)
SW4STM32\STM3210E-EVAL_XL\.cproject (12302, 2017-05-12)
SW4STM32\STM3210E-EVAL_XL\.project (15542, 2017-05-12)
SW4STM32\STM3210E-EVAL_XL\STM32F103ZGTx_FLASH.ld (4591, 2017-05-12)
SW4STM32\STM32303C_EVAL\.cproject (12220, 2017-05-12)
SW4STM32\STM32303C_EVAL\.project (15540, 2017-05-12)
SW4STM32\STM32303C_EVAL\STM32F303VCTx_FLASH.ld (5125, 2017-05-12)
SW4STM32\STM32303xE_EVAL\.cproject (12239, 2017-05-12)
SW4STM32\STM32303xE_EVAL\.project (15541, 2017-05-12)
SW4STM32\STM32303xE_EVAL\STM32F303VETx_FLASH.ld (5126, 2017-05-12)
SW4STM32\STM32373C_EVAL\.cproject (12199, 2017-05-12)
... ...

/** ******************** (C) COPYRIGHT 2017 STMicroelectronics ******************* * @file readme.txt * @author MCD Application Team * @version V4.1.0 * @date 26-May-2017 * @brief Description of the USB Custom_HID Demo. ****************************************************************************** * @attention * *

© COPYRIGHT(c) 2017 STMicroelectronics

* * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions 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 its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. * ****************************************************************************** */ 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. 8MHZ Cristal should be mounted on boards to recognize USB device. 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 Directory contents ================== + \inc: contains the Demo firmware header files + \EWARM: contains preconfigured projects for EWARM toolchain + \MDK-ARM: contains preconfigured projects for MDK-ARM toolchain + \SW4STM32: contains preconfigured projects for STM32 System Workbench for toolchain + \src: contains the Demo firmware source files Hardware environment ==================== This example runs these STMicroelectronics evaluation boards and can be easily tailored to any other hardware: - STM3210B-EVAL - STM3210E-EVAL - STM32L152-EVAL - STM32F373C_EVAL - STM32F303C_EVAL - STM32F303E_EVAL - STM32L152D-EVAL - STM3210B-EVAL Set-up - Jumper JP1 (USB disconnect) should be connected in position 2-3. - STM3210E-EVAL Set-up - Jumper JP14 (USB disconnect) should be connected in position 2-3. - STM32L152-EVAL Set-up - Jumpers JP18 and JP19 should be connected. - Jumper JP17 should be connected in position 5-6 (PB12 connector) - Note that Joystick Right and Left buttons are used for this Demo. - STM32L152D-EVAL Set-up - LCD Glass should be mounted On IO position for Potentiometer usage. - JP13 should be connected to ADC input. How to use it ============= In order to make the program work, you must do the following : - Open your preferred toolchain - Rebuild all files and load your image into target memory - In the workspace toolbar select the project configuration: - STM3210B-EVAL: to configure the project for STM32 Medium-density devices - STM3210E-EVAL: to configure the project for STM32 High-density devices - STM3210E-EVAL_XL: to configure the project for STM32 XL-density devices - STM32L152-EVAL: to configure the project for STM32 Medium-Density Low-Power devices - STM32L152D-EVAL: to configure the project for STM32 High-Density Low-Power devices - STM32373C-EVAL: to configure the project for STM32F37xxx devices - STM32303C-EVAL: to configure the project for STM32F303xx devices. - STM32303E-EVAL: to configure the project for STM32F303xE devices - Run the application ************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE******

近期下载者

相关文件


收藏者