beautypg.com

Oki JOB60851 User Manual

Page 49

background image

Chapter 4 Software Development

page 4-14

n Note n

The Windows 98 CD-ROM is not necessary if the OEM release has copied the
installation image from the CD-ROM to the directory c:\Windows\Option. If so, specify
that directory instead of the CD-ROM.

(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 interrupt-driven communications control. The following API
functions provide the application layer with access to such functionality as initialization, specifying
callback function, and initiating data flow.

usb_init()

Initialize USB control variables

usb_set_callback()

Specify notification function for bulk transfer compl

usb_tx_start()

Specify transmit data buffer and start

usb_rx_start()

Specify receive data buffer and start

usb_int_enable()

Enable packet ready interrupt

usb_int_disable()

Disable packet ready interrupt

usb_remote_wakeup()

Transmit remote wake-up signal

usb_cfg_status()

Retrieve information from current configuration

descriptor

usb_alt_status()

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.