English
Language : 

XR22801 Datasheet, PDF (30/42 Pages) Exar Corporation – Hi-Speed USB to 10/100 Ethernet Bridge
XR22801
HID Reports
The I2C and EDGE functions in the XR22801 are HID functions. I2C data may be read or written to / from the slave device
using the interrupt in and interrupt out endpoints via HID input and output reports. Additionally, XR22801 device register
access using the control endpoint for both I2C and EDGE functions is performed via HID feature reports. Reading uses indi-
rect addressing such that for register reads, the register address must first be written and the register value may then be
read. Both types of reports are described below.
Input and Output Reports
Input and output reports using the interrupt in and interrupt out endpoints follow the following format. For more information
on reading and writing on the I2C interface refer to AN220, Programming applications using the XR2280x I2C Interface.
I2C_SLAVE_OUT
Transfer Type: Interrupt Out
Transfer Size: 37 bytes
The I2C_SLAVE_OUT report writes and / or reads up to 32 bytes of data on the I2C interface. Note that all interrupt out
transfers will be automatically followed by an interrupt in transfer. For write only transfers, the interrupt in packet will contain
the status of the interrupt out transfer. For read only or write and read transfers, the interrupt in packet will contain the read
data, as well as the status of the interrupt out transfer. The format of the interrupt out packet is given below.
Field
Report ID
Flags
WrSize
RdSize
SlaveAddr
Data
Offset
0
1
Size
1
1
Value
0x00
Bitmap
2
1
Number
3
1
Number
4
1
Number
5
32
Data
Description
Write, read, or write and read I2C data
Transfer options
D0: Prefix transfer with a start bit.
D1: Append a stop bit to the transfer.
D2: ACK last read to extend a read transfer (e.g. if more than 32 bytes
need to be read).
The default is to NAK the last read in the transfer. This bit has no effect
if RdSize is 0.
D3: Reserved
D7..D4: Sequence number. This can help the host to correlate an IN
response with a prior OUT command. This field is optional.
Number of data bytes to write. Valid values are 0 to 32. The 7-bit slave
address should not be included in this total.
Number of bytes to read. Valid values are 0 to 32.
The 7-bit slave address* to send. The XR22801 will automatically set
the I2 C read/write bit, so bit D0 of this field is ignored.
Data to be written to the slave. HID uses a fixed report size for each
specific report ID so this field will always be 32 bytes long. However,
only the number of bytes specified in WrSize will be written. Other bytes
will be ignored.
* Note: To support 10-bit addressing the standard 7-bit address must be set to 1111 0xxB where xx are the most significant bits of the 10-
bit address. All 4 of these 7-bit addresses are reserved and will not be used by any slaves with 7-bit only addresses. The least significant
bit of the address byte still specifies the direction. For writes, the first data byte which was previously unformatted is now reserved for the
least significant 8 bits of the 10-bit address. Additional data bytes remain unformatted. For reads, the write-then-read combined transfer
format is always used. During the write portion of the combined transfer the master must send at least one data byte which contains the
least significant 8 bits of the 10-bit address. After all of the write data is sent the master then sends a restart bit. This is followed with an
address byte which has the same 7-bit address 1111 0xxB as in the write portion. However, the direction bit is now 1 for reading. The slave
then sends the read data as usual. The least significant 8 bits of the 10-bit address are not sent again after the restart bit.
© 2015 Exar Corporation
30 / 42
exar.com/XR22801
Rev 1B