beautypg.com

Usb_in_2(), Usb_out_1(), E 50) – Maxim Integrated 73S12xxF Software User Manual

Page 50

background image

73S12xxF Software User Guide

UG_12xxF_016

50

Rev. 1.50

USBStatus: Output parameter
Contains the current status of this transmission, one of the following:

USB_TX_PENDING: Transmission has started, but is not yet complete. On
either a successful completion or a termination due to error, the USBStatus will
change to one of the following:
USB_ACTIVE: Successful data transmission.
USB_SUSPENDED: The HOST has suspended the USB bus, retry later.
USB_STALLED: This Endpoint has been STALLED.
USB_RESET: The HOST has reset the USB bus, retry later.

Return Codes None.

USB_IN_2()

Purpose

Send data to the Host through Endpoint 2 (INTERRUPT IN).

Synopsis

Void USB_IN_2 ( IN struct USB_t *pUSB );

Parameters

USBData: Input parameter
Specifies the pointer to the data to be transmitted to the Host.

USBLen: Input/Output parameter
On input, specifies the number of bytes to send to the Host. On output, specifies the
current number of bytes sent to the Host.

USBStatus: Output parameter
Contains the current status of this transmission, one of the following:

USB_TX_PENDING: Transmission has started, but is not yet completed. On
either a successful completion or a termination due to error, the USBStatus will
change to one of the following:
USB_ACTIVE: Successful data transmission.
USB_SUSPENDED: The HOST has suspended the USB bus, retry later.
USB_STALLED: This Endpoint has been STALLED.
USB_RESET: The HOST has reset the USB bus, retry later.

Return Codes None.

USB_OUT_1()

Purpose

Receive a buffer from the Host through Endpoint 1 (BULK OUT). The data may be
received within several packets if the buffer size is greater or equal to the Maximum
Packet Size, specified by the Descriptor String initialized in

USB_Init()

.


Synopsis

Void USB_OUT_2 ( IN struct USB_t *pUSB );


Parameters

USBData: Output parameter
Contains the bytes received from the Host.

USBLen: Input/Output parameter
On input, specifies the maximum number of bytes to receive from the Host. On
output, specifies the current number of bytes received from the Host.

USBStatus: Output parameter
Contains the current status of this reception, one of the following:

USB_RX_PENDING: Reception has started, but is not yet completed. On either
a successful completion or a termination due to error, the USBStatus will change
to one of the following:
USB_ACTIVE: Successful data reception.
USB_SUSPENDED: The HOST has suspended the USB bus, retry later.
USB_STALLED: This Endpoint has been STALLED.
USB_RESET: The HOST has reset the USB bus, retry later.
USB_ERR_OVERFLOW: The HOST has sent too much data.