Cusbiobufclass; Cusbiobufpool Class; Usbio Demo Application; E.6.6 Cusbiobufclass - Motorola USB08 Reference Manual

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

E.6.6 CUsbIoBufClass

E.6.7 CUsbIoBufPool Class

E.7 USBIO Demo Application

USB08 Evaluation Board
MOTOROLA
buffer with data. After that, the buffer is sent to the pipe using the Write
function of the CUsbIoPipe class. After all buffers are submitted the
routine waits for the first pending buffer to complete. If a buffer is
completed by the USBIO driver the buffer is put back to the pool and the
main loop is started from the beginning.
The helper class CUsbIoBuf is used as a descriptor for buffers that are
processed by the class CUsbIoPipe and derived classes. One instance
of the CUsbIoBuf class has to be created for each buffer. The
CUsbIoBuf object stores context and status information that is needed
to process the buffer asynchronously.
The CUsbIoBuf class contains a link element (Next pointer). This may
be used to build a chain of linked buffer objects to hold them in a list. This
way, the management of buffers can be simplified.
The class CUsbIoBufPool is used to manage a pool of free buffers. It
provides functions used to allocate an initial number of buffers, to get a
buffer from the pool, and to put a buffer back to the pool.
The USBIO Demo Application demonstrates the usage of the USBIO
driver interface. It is based on the USBIO Class Library which covers the
native API calls. The Application is designed to handle one USB driver
that can contain multiple pipes. It is possible to run multiple instances of
the application, each connected to another USB device.
The USBIO Demo Application is a dialog based MFC (Microsoft
Foundation Classes) application. The main dialog contains a button that
allows to open an output window. All output data and all error messages
are directed to this window. The button "Clear Output Window" discards
the actual contents of the window.
Universal USB Device Driver (USBIO)
Universal USB Device Driver (USBIO)

USBIO Demo Application

Designer Reference Manual
223

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents