
EZ-USB FX2 Technical Reference Manual
Page 10-48 EZ-USB FX2 Technical Reference Manual v2.1
Figure 10-31. FIFO-Read w/ AUTOIN = 0, Committing Packets via EPxBCL
10.4.6 Firmware Access to IN packet(s), (AUTOIN=1)
The only difference between auto (AUTOIN=1) and manual (AUTOIN=0) modes for IN packet(s) is
the packet length feature (EPxAUTOINLENH/L).
Figure 10-32. AUTOIN=1, GPIF FIFO Read Transactions, AUTOIN = 1
void TD_Poll( void )
{
… … … … …
if( !( EP68FIFOFLGS & 0x10 ) )
{ // EP8FF=0 when buffer available
// host is taking EP8 data fast enough
Peripheral_FIFORead( GPIF_EP8 );
}
if( gpifdone_event_flag )
{ // GPIF currently pointing to EP8, last FIFO accessed
if( !( EP2468STAT & 0x80 ) )
{ // EP8F=0 when buffer available
// modify the data
EP8FIFOBUF[ 0 ] = 0x02; // <STX>, packet start of text msg
EP8FIFOBUF[ 7 ] = 0x03; // <ETX>, packet end of text msg
SYNCDELAY;
EP8BCH = 0x00;
SYNCDELAY;
EP8BCL = 0x08; // pass buffer on to host
}
}
… … … … …
}
Data Path
8051
USB
Host
Slave
Peripheral
AUTOIN=1, Long Transfer Mode
GPIF
Komentarze do niniejszej Instrukcji