keyboard2mouse
Overview
This example implements the host and the device, where the one controller works as a host and the other controller works as a device.
The host supports the keyboard device and device works as a mouse when connecting to the PC.
System Requirement
Hardware requirements
Mini/micro USB cable
USB A to micro AB cable
Hardware (Tower module/base board, and so on) for a specific device
Personal Computer(PC)
Software requirements
The project path is:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_keyboard2mouse/ / .
The
is Bare Metal or FreeRTOS OS.
Getting Started
Hardware Settings
First, set the hardware jumpers (Tower system/base module) to default settings.
Prepare the example
Download the program to the target board.
Power off the target board and power on again.
Connect devices to the board and connect a USB cable between the PC and the USB device port of the board.
For detailed instructions, see the appropriate board User’s Guide. Host hid example doesn’t support HID report descriptor analysis, this example assume that the device data are sent by specific order.
For more detail, please refer to the code. For the device list we tested,
please refer to chapter “Peripheral devices tested with the USB Host stack” in “SDK Release Notes xxxx(board name)”.
Run the example
Connect the board UART to the PC and open the COM port in a terminal tool.
Plug in a hub or a keyboard device to the full-speed only port. The attached information prints out in the terminal.
Plug in the device high-speed port into the PC. An HID-compliant mouse is enumerated in the Device Manager.
Press <w, s, a, d> in the keyboard, which causes the mouse to move.
Press ‘w’, the mouse move up.
Press ‘s’, the mouse move down.
Press ‘a’, the mouse move left.
Press ‘d’, the mouse move right.
Supported Boards
MIMXRT1170-EVKB
MIMXRT1160-EVK
MIMXRT1180-EVK