
Chapter 9. Slave FIFOs Page 9-31
Figure 9-43. TD_Poll Example, AUTOIN=0, Editing a Packet via EPxBCH:L
9.3.9 Auto-In / Auto-Out Initialization
Enabling Auto-In transfers between slave FIFO and endpoint
Typically, a FIFO is configured for Auto-In mode as follows:
1. Configure bits IFCONFIG[7:4] to define the behavior of the interface clock.
2. Set bits IFCFG1:0=11.
3. Reset the FIFOs.
4. Set bit EPxFIFOCFG.3=1.
5. Set the size via the EPxAUTOINLENH:L registers.
Enabling Auto-Out transfers between endpoint and slave FIFO
Typically, a FIFO is configured for Auto-Out mode as follows:
1. Configure bits IFCONFIG[7:4] to define the behavior of the interface clock.
2. Set bits IFCFG1:0=11.
3. Reset the FIFOs.
4. Set bit EPxFIFOCFG.4=1.
TD_Poll():
… … … … …
if( master_finished_xfr( ) )
{ // 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
}
… … … … …
Komentarze do niniejszej Instrukcji