Chapter 4 Software Development
n Note n
The Windows 98
(5)Operate mouse with terminal emulator
After reading the messages on the terminal emulator screen, enter HELP at the command prompt to display the commands available. Try RIGHT, LEFT, UP, and DOWN, for example.
Another way to test the emulated USB mouse is with HIDview, the HID class device portion of Usbcheck.exe.
4-2-7. Modifying Application Layer
This section gives a hints for modifying the application layer. Note that, in practice, such modifications require careful study of the USB Specifications, M852.txt, and the source code.
A USB device controller basically uses
usb_init()
usb_set_callback() usb_tx_start() usb_rx_start() usb_int_enable() usb_int_disable() usb_remote_wakeup() usb_cfg_status() usb_alt_status()
Initialize USB control variables
Specify notification function for bulk transfer compl Specify transmit data buffer and start
Specify receive data buffer and start Enable packet ready interrupt Disable packet ready interrupt Transmit remote
Retrieve information from current configuration descriptor Retrieve current alternate setting
The sample firmware provides everything needed to evaluate hot plugging (a.k.a. dynamic insertion and removal) using control transfers and standard device requests.
The sample application layer provides loopback from endpoint 1 (EP1) to endpoint 2 (EP2). Modifying the source code in the file main.c permits the simple use of bulk transfers from upstream applications.
The source code below gives skeletons for two simple application layers consisting of only BulkOut (receive) or BulkIn (transmit) operations, respectively. Modify the source code, recompile it, download it to the JOB60851 board, and run the program.
For further details on the API functions, refer to the file M852.txt.
page