
Chapter 10. General Programmable Interface (GPIF) Page 10-61
Figure 10-55. Initialization for Burst FIFO-Read Transactions
void TD_Init( void )
{
… … … … …
GpifInit(); // Configures GPIF from GPIFTool generated waveform data
// TODO: configure other endpoints, etc. here
EP8CFG = 0xE0; // EP8 is DIR=IN, TYPE=BULK
SYNCDELAY;
EP8FIFOCFG = 0x04; // EP8 is AUTOOUT=0, AUTOIN=0, ZEROLEN=1, WORDWIDE=0
SYNCDELAY;
// TODO: arm OUT buffer(s) here
// setup INT4 as internal source for GPIF interrupts
// using INT4CLR (SFR), automatically enabled
//INTSETUP |= 0x03; //Enable INT4 Autovectoring
//SYNCDELAY;
//GPIFIE = 0x03; // Enable GPIFDONE and GPIFWF interrupt(s)
//SYNCDELAY;
//EIE |= 0x04; // Enable INT4 ISR, EIE.2(EIEX4)=1
// TODO: configure GPIF interrupt(s) to meet your needs here
… … … … …
// tell peripheral we’re going into high speed xfr mode
Peripheral_SetAddress( PERIPHCS );
Peripheral_SingleByteWrite( P_HSMODE );
// configure some GPIF registers
Peripheral_SetAddress( BURSTMODE );
}
Comentários a estes Manuais