HID

所属分类:单片机开发
开发工具:Visual C++
文件大小:69KB
下载次数:58
上传日期:2014-03-11 21:55:43
上 传 者juanhair
说明:  stm32f207高速USB的HID代码
(stm32f207 Speed ​ ​ USB HID code)

文件列表:
HID\inc\lcd_log_conf.h (2964, 2013-07-02)
HID\inc\stm32f10x_conf.h (3206, 2013-07-02)
HID\inc\stm32f2xx_conf.h (3598, 2013-07-02)
HID\inc\stm32fxxx_it.h (2047, 2013-07-02)
HID\inc\usbd_conf.h (2212, 2013-07-02)
HID\inc\usbd_desc.h (3420, 2013-07-02)
HID\inc\usb_conf.h (9814, 2013-07-02)
HID\MDK-ARM\STM322xG-EVAL\ExtDll.iex (19, 2013-07-02)
HID\MDK-ARM\STM322xG-EVAL\startup_stm32f2xx.lst (93861, 2013-07-02)
HID\MDK-ARM\STM322xG-EVAL\STM322xG-EVAL.htm (100322, 2013-07-02)
HID\MDK-ARM\STM322xG-EVAL\STM322xG-EVAL.map (172108, 2013-07-02)
HID\MDK-ARM\usbd_hid.uvopt (22687, 2013-07-02)
HID\MDK-ARM\usbd_hid.uvproj (22822, 2013-07-02)
HID\src\app.c (3717, 2013-07-02)
HID\src\stm32fxxx_it.c (7649, 2013-07-02)
HID\src\system_stm32f10x.c (29988, 2013-07-02)
HID\src\system_stm32f2xx.c (20782, 2013-07-02)
HID\src\usbd_desc.c (8395, 2013-07-02)
HID\src\usbd_usr.c (4722, 2013-07-02)
HID\src\usb_bsp.c (9447, 2013-07-02)
HID\MDK-ARM\STM322xG-EVAL (0, 2014-01-25)
HID\inc (0, 2014-01-25)
HID\MDK-ARM (0, 2014-01-25)
HID\src (0, 2014-01-25)
HID (0, 2014-01-25)

/** @page USBD_HID USB Device HID example @verbatim ******************** (C) COPYRIGHT 2011 STMicroelectronics ******************* * @file readme.txt * @author MCD Application Team * @version V1.0.0 * @date 22-July-2011 * @brief Description of the USB Device HID (Joystick) example ****************************************************************************** * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. ****************************************************************************** @endverbatim @par Example Description This example provides a description of how to use the USB OTG Device peripheral on the STM32F2xx and STM32F105/7 devices. The STM32 device is enumerated as an USB Device Joystick Mouse, that uses the native PC Host HID driver. The Joystick mounted on the STM322xG-EVAL and STM3210C-EVAL boards is used to emulate the Mouse directions. This example supports remote wakeup (which is the ability of a USB device to bring a suspended bus back to the active condition), and the key push-button is used as the remote wakeup source. By default, in Windows powered PC the Power Management feature of USB mouse devices is turned off. This setting is different from classic PS/2 computer functionality. Therefore, to enable the Wake from standby option, you must manually turn on the Power Management feature for the USB mouse. To manually enable the Wake from standby option for the USB mouse, - start "Device Manager", - select "Mice and other pointing devices", - select the "HID-compliant mouse" device (make sure that PID &VID are equal to 0x5710 & 0x0483 respectively) - right click and select "Properties", - select "Power Management" tab, - finally click to select "Allow this device to wake the system from standby" check box. This example works - in high speed (HS) when the STM322xG-EVAL board and the USB OTG HS peripheral are used - in full speed (FS) when the STM322xG-EVAL board and the USB OTG FS peripheral are used or when using the STM3210C-EVAL board. @par Hardware and Software environment - This example runs on STM32F105/7 Connectivity line and STM32F2xx devices. - This example has been tested with STM3210C-EVAL RevB (STM32F105/7 devices) and STM322xG-EVAL RevB (STM32F2xx) - STM3210C-EVAL Set-up - use CN2 connector to connect the board to a PC host - STM322xG-EVAL Set-up - Use CN8 connector to connect the board to a PC host when using USB OTG FS peripheral - Use CN9 connector to connect the board to a PC host when using USB OTG HS peripheral @par How to use it ? + EWARM - Open the usbd_hid.eww workspace. - In the workspace toolbar select the project config: - STM322xG-EVAL_USBD-HS: to configure the project for STM32F2xx devices and use USB OTG HS peripheral - STM322xG-EVAL_USBD-FS: to configure the project for STM32F2xx devices and use USB OTG FS peripheral - STM3210C-EVAL_USBD-FS: to configure the project for STM32F105/7 devices - Rebuild all files: Project->Rebuild all - Load project image: Project->Debug - Run program: Debug->Go(F5) + MDK-ARM - Open the usbd_hid.uvproj project - In the build toolbar select the project config: - STM322xG-EVAL_USBD-HS: to configure the project for STM32F2xx devices and use USB OTG HS peripheral - STM322xG-EVAL_USBD-FS: to configure the project for STM32F2xx devices and use USB OTG FS peripheral - STM3210C-EVAL_USBD-FS: to configure the project for STM32F105/7 devices - Rebuild all files: Project->Rebuild all target files - Load project image: Debug->Start/Stop Debug Session - Run program: Debug->Run (F5) + RIDE - Open the usbd_hid.rprj project. - In the configuration toolbar(Project->properties) select the project config: - STM322xG-EVAL_USBD-HS: to configure the project for STM32F2xx devices and use USB OTG HS peripheral - STM322xG-EVAL_USBD-FS: to configure the project for STM32F2xx devices and use USB OTG FS peripheral - STM3210C-EVAL_USBD-FS: to configure the project for STM32F105/7 devices - Rebuild all files: Project->build project - Load project image: Debug->start(ctrl+D) - Run program: Debug->Run(ctrl+F9) + TASKING - Open TASKING toolchain. - Click on File->Import, select General->'Existing Projects into Workspace' and then click "Next". - Browse to TASKING workspace directory and select the project: - STM322xG-EVAL_USBD-HS: to configure the project for STM32F2xx devices and use USB OTG HS peripheral - STM322xG-EVAL_USBD-FS: to configure the project for STM32F2xx devices and use USB OTG FS peripheral - STM3210C-EVAL_USBD-FS: to configure the project for STM32F105/7 devices - Under Windows->Preferences->General->Workspace->Linked Resources, add a variable path named "Cur_Path" which points to the folder containing "Libraries", "Project" and "Utilities" folders. - Rebuild all project files: Select the project in the "Project explorer" window then click on Project->build project menu. - Run program: Select the project in the "Project explorer" window then click Run->Debug (F11) + TrueSTUDIO - Open the TrueSTUDIO toolchain. - Click on File->Switch Workspace->Other and browse to TrueSTUDIO workspace directory. - Click on File->Import, select General->'Existing Projects into Workspace' and then click "Next". - Browse to the TrueSTUDIO workspace directory and select the project: - STM322xG-EVAL_USBD-HS: to configure the project for STM32F2xx devices and use USB OTG HS peripheral - STM322xG-EVAL_USBD-FS: to configure the project for STM32F2xx devices and use USB OTG FS peripheral - STM3210C-EVAL_USBD-FS: to configure the project for STM32F105/7 devices - Under Windows->Preferences->General->Workspace->Linked Resources, add a variable path named "CurPath" which points to the folder containing "Libraries", "Project" and "Utilities" folders. - Rebuild all project files: Select the project in the "Project explorer" window then click on Project->build project menu. - Run program: Select the project in the "Project explorer" window then click Run->Debug (F11) @note Known Limitations This example retargets the C library printf() function to the EVAL board’s LCD screen (C library I/O redirected to LCD) to display some Library and user debug messages. TrueSTUDIO Lite version does not support I/O redirection, and instead have do-nothing stubs compiled into the C runtime library. As consequence, when using this toolchain no debug messages will be displayed on the LCD (only some control messages in green will be displayed in bottom of the LCD). To use printf() with TrueSTUDIO Professional version, just include the TrueSTUDIO Minimal System calls file "syscalls.c" provided within the toolchain. It contains additional code to support printf() redirection. *

© COPYRIGHT 2011 STMicroelectronics

*/

近期下载者

相关文件


收藏者