Skip to content
Generic Communication with USB HID Device Class - LPC4357 Examples
C C++ Other
Branch: master
Clone or download
Latest commit 27fbd90 Apr 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lpc4357_usb_custom_hid Added code to repo Apr 7, 2019
lpc4357_xplorer_plusplus_board
lpc_chip_43xx Added code to repo Apr 7, 2019
.gitignore Added code to repo Apr 7, 2019
README.md

README.md

Generic Communication with USB HID Class - Examples

Tutorial page: https://ravikiranb.com/tutorials/generic-comm-usb-hid/

Examples are tested on Ubuntu 16.04 LTS.

Software Requirements

Hardware Requirements

Get Source Code

$ git clone https://github.com/rkprojects/generic-comm-usb-hid-examples.git

Compile Source Code

  • In MCUXpresso switch workspace to cloned directory generic-comm-usb-hid-examples.
  • Add all projects inside directory generic-comm-usb-hid-examples to workspace.
  • Build project lpc4357_usb_custom_hid.
  • master branch contains LED control example.
  • system_power_control branch contains host sleep mode example.

LED Example

  • Checkout master branch, compile and flash the firmware and connect USB1 to host.
  • $ cd generic-comm-usb-hid-examples/lpc4357_usb_custom_hid/tools
  • $ sudo python3 hid_host_test.py
  • Follow on screen instructions.
  • You can add the usb device in udev rules to avoid running script as sudo.
  • Pressing user switch SW2 on board will cause read interrupt in test tool.

System Power Control Example

  • Checkout system_power_control branch, compile and flash the firmware and connect USB1 to host.
  • Cross check with lsusb whether device got detected.
  • Pressing user switch SW2 will cause computer to enter sleep mode.
  • If you are trying it on Windows (not tested) ensure Sleep mode is enabled.

License

Some of the firmware source code files are under MIT license, others are under NXP's LPCOpen License. Source code header lists the corresponding copyright notice.

Python host test application source code files are under MIT license.

You can’t perform that action at this time.