STM32 HID

所属分类:嵌入式/单片机/硬件编程
开发工具:C/C++
文件大小:389KB
下载次数:20
上传日期:2018-03-26 11:24:37
上 传 者12343214
说明:  STM32官方例程 USB HOST HID
(STM32 USB HOST HID official code)

文件列表:
程序\STM32_USB_Device_Library\Class\audio\inc\usbd_audio_core.h (5236, 2015-11-09)
程序\STM32_USB_Device_Library\Class\audio\inc\usbd_audio_out_if.h (2987, 2015-11-09)
程序\STM32_USB_Device_Library\Class\audio\src\usbd_audio_core.c (24079, 2015-11-09)
程序\STM32_USB_Device_Library\Class\audio\src\usbd_audio_out_if.c (8371, 2015-11-09)
程序\STM32_USB_Device_Library\Class\cdc\inc\usbd_cdc_core.h (4030, 2015-11-09)
程序\STM32_USB_Device_Library\Class\cdc\inc\usbd_cdc_core_loopback.h (2602, 2015-11-09)
程序\STM32_USB_Device_Library\Class\cdc\inc\usbd_cdc_if_template.h (1941, 2015-11-09)
程序\STM32_USB_Device_Library\Class\cdc\src\usbd_cdc_core.c (26223, 2015-11-09)
程序\STM32_USB_Device_Library\Class\cdc\src\usbd_cdc_core_loopback.c (20720, 2015-11-09)
程序\STM32_USB_Device_Library\Class\cdc\src\usbd_cdc_if_template.c (6414, 2015-11-09)
程序\STM32_USB_Device_Library\Class\customhid\inc\usbd_customhid_core.h (3449, 2015-11-09)
程序\STM32_USB_Device_Library\Class\customhid\src\usbd_customhid_core.c (21930, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\inc\usbd_dfu_core.h (6065, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\inc\usbd_dfu_mal.h (3373, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\inc\usbd_flash_if.h (2731, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\inc\usbd_mem_if_template.h (2166, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\inc\usbd_otp_if.h (2080, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\src\usbd_dfu_core.c (31895, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\src\usbd_dfu_mal.c (7651, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\src\usbd_flash_if.c (6423, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\src\usbd_mem_if_template.c (4353, 2015-11-09)
程序\STM32_USB_Device_Library\Class\dfu\src\usbd_otp_if.c (4071, 2015-11-09)
程序\STM32_USB_Device_Library\Class\hid\inc\usbd_hid_core.h (2900, 2015-11-09)
程序\STM32_USB_Device_Library\Class\hid\src\usbd_hid_core.c (14069, 2015-11-09)
程序\STM32_USB_Device_Library\Class\hid_cdc_wrapper\inc\usbd_hid_cdc_wrapper.h (2098, 2015-11-09)
程序\STM32_USB_Device_Library\Class\hid_cdc_wrapper\src\usbd_hid_cdc_wrapper.c (14310, 2015-11-16)
程序\STM32_USB_Device_Library\Class\hid_msc_wrapper\inc\usbd_msc_hid_core.h (2261, 2015-11-09)
程序\STM32_USB_Device_Library\Class\hid_msc_wrapper\src\usbd_msc_hid_core.c (11210, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\inc\usbd_msc_bot.h (4161, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\inc\usbd_msc_core.h (2045, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\inc\usbd_msc_data.h (2413, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\inc\usbd_msc_mem.h (2694, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\inc\usbd_msc_scsi.h (6311, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\src\usbd_msc_bot.c (9585, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\src\usbd_msc_core.c (13071, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\src\usbd_msc_data.c (2550, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\src\usbd_msc_scsi.c (17346, 2015-11-09)
程序\STM32_USB_Device_Library\Class\msc\src\usbd_storage_template.c (6522, 2015-11-09)
程序\STM32_USB_Device_Library\Core\inc\usbd_conf_template.h (2046, 2015-06-24)
程序\STM32_USB_Device_Library\Core\inc\usbd_core.h (2687, 2015-11-09)
... ...

/** @page USBH_HID USB Host HID example @verbatim ******************** (C) COPYRIGHT 2015 STMicroelectronics ******************* * @file readme.txt * @author MCD Application Team * @version V1.2.0 * @date 09-November-2015 * @brief Description of the USB Host HID example ****************************************************************************** * * 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 * ****************************************************************************** @endverbatim @par Example Description This example provides a description of how to use the USB OTG host peripheral on the STM32F207xx, STM32F407xx, STM32F429xx and STM32F107xx devices. When an USB Device is attached to the Host port, the device is enumerated and checked whether it can support HID device or not, if the attached device is HID one, when the user press the B3 button, the mouse or the keyboard application is launched. Moving the mouse will move the pointer in the display rectangle and if a button is pressed, the corresponding rectangle will be highlighted in green If a keyboard has been attached, the display show the following messages and the taped characters are displayed in green on the display. This example works: - in high speed (HS) when the STM322xG-EVAL, the STM324xG-EVAL or the STM324x9I-EVAL board and the USB OTG HS peripheral are used. - in full speed (FS) when the STM322xG-EVAL, the STM324xG-EVAL or the STM324x9I-EVAL board and the USB OTG FS peripheral are used, or when using the STM3210C-EVAL board. @note In the USB Host HID class, two layouts are defined in the usbh_hid_keybd.h file and could be used (Azerty and Querty) //#define QWERTY_KEYBOARD #define AZERTY_KEYBOARD The User can eventually add his own layout by editing the HID_KEYBRD_Key array in the usbh_hid_keybd.c file @par Hardware and Software environment - This example has been tested with STM3210C-EVAL RevB (STM32F107xx devices), STM322xG-EVAL RevB (STM32F207xx), STM324xG-EVAL RevB (STM32F407xx) and STM324x9I-EVAL RevB (STM32F429xx) - STM3210C-EVAL Set-up - Use CN2 connector to connect the board to host - STM322xG-EVAL Set-up - Use CN8 connector to connect the board to host when using USB OTG FS peripheral - Use CN9 connector to connect the board to host when using USB OTG HS peripheral @note Make sure that : - Please ensure that jumper JP31 is fitted when using USB OTG HS - STM324xG-EVAL Set-up - Use CN8 connector to connect the board to host when using USB OTG FS peripheral - Use CN9 connector to connect the board to host when using USB OTG HS peripheral @note Make sure that : - Please ensure that jumper JP31 is fitted when using USB OTG HS - STM324x9I-EVAL Set-up - Use CN14 connector to connect the board to host when using USB OTG FS peripheral - Use CN9 connector to connect the board to host when using USB OTG HS peripheral - Use CN15 connector to connect the board to host when using USB OTG HS-IN-FS peripheral Note that some FS signals are shared with the HS ULPI bus, so some PCB rework is needed. For more details, refer to section "USB OTG2 HS & FS" in STM324x9I-EVAL Evaluation Board User Manual. @note Make sure that : - Please ensure that jumper JP16 is not fitted when using USB OTG FS @par How to use it ? In order to make the program work, you must do the following: - Open your preferred toolchain - In the workspace toolbar select the project config: - STM322xG-EVAL_USBD-HS: to configure the project for STM32F207xx devices and use USB OTG HS peripheral - STM322xG-EVAL_USBD-FS: to configure the project for STM32F207xx devices and use USB OTG FS peripheral - STM324xG-EVAL_USBD-HS: to configure the project for STM32F407xx devices and use USB OTG HS peripheral - STM324xG-EVAL_USBD-FS: to configure the project for STM32F407xx devices and use USB OTG FS peripheral - STM324x9i-EVAL_USBD-HS:to configure the project for STM32F429xx devices and use USB OTG HS peripheral - STM324x9i-EVAL_USBD-FS:to configure the project for STM32F429xx devices and use USB OTG FS peripheral - STM324x9i-EVAL_USBD-HS-IN-FS: to configure the project for STM32F429xx devices and use USB OTG HS-IN-FS peripheral - STM3210C-EVAL_USBD-FS: to configure the project for STM32F107xx devices - Rebuild all files and load your image into target memory - Run the application @note Known Limitations This example retarget 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 STMicroelectronics

*/

近期下载者

相关文件


收藏者