A demo project of USB HID bi-directional generic device for Kinetis SDK 1.1.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A demo project of USB HID bi-directional generic device for Kinetis SDK 1.1.0

A demo project of USB HID bi-directional generic device for Kinetis SDK 1.1.0

The latest Kinetis SDK 1.1.0 supported HID bi-directional communication, the new API USB_Class_HID_Recv_Data() can be used to receive data from USB HOST. But without demo and test tool, customer still has no idea about how to enstablish such kind of communication in their application. I create a simple demo derived from existed hid_keyboard project, together with basic endpoint read/write test by Bus Hound. The demo is built and tested on my FRDM-K64F and can be port to other USB Kinetis device as well.


Working steps:

1) Unzip attached code and project to C:\Freescale\KSDK_1.1.0\usb\example\device\hid folder.

2) Compile project (IAR) and download to FRDM-K64F via CMSIS-DAP debugger.

3) Open Bus hound, enter "Devices" table and uncheck all box and check "auto select hot plugged devices".

4) Plug USB cable and connects to PC, will found the device is checked in bus hound device tree.

5) Double click device, and select OUT endpoint to send 16 bytes to device.

6) Observe the g_OUT_ep_buf[]'s change in firmware (Demostrate receive function only)

19368_19368.jpgusb.jpg

Labels (1)
Attachments
Comments

The most important steps of developing a HID generic device is to modify the "usb_descriptor.c" file to change the device..config..interface..endpoint descriptor and HID report descriptor.

I like it, thanks.

No ratings
Version history
Last update:
‎02-02-2015 02:17 AM
Updated by: