Cypress Semiconductor FX2LP Informations techniques Page 241

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 460
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 240
Chapter 10. General Programmable Interface (GPIF) Page 10-51
Figure 10-37. Sourcing an IN Packet by writing to EPxBCH:L
TD_Poll():
… … … … …
if( source_pkt_event )
{ // 100msec background timer fired
if( holdoff_master( ) )
{ // signaled “busy” to master successful
while( !( EP68FIFOFLGS & 0x20 ) )
{ // EP8EF=0, when buffer not empty
; // wait ‘til host takes entire FIFO data
}
// Reset FIFO 8.
FIFORESET = 0x80; // Activate NAK-All to avoid race conditions.
SYNCDELAY;
FIFORESET = 0x08; // Reset FIFO 8.
SYNCDELAY;
FIFORESET = 0x00; // Deactivate NAK-All.
EP8FIFOBUF[ 0 ] = 0x02; // <STX>, packet start of text msg
EP8FIFOBUF[ 1 ] = 0x06; // <ACK>
EP8FIFOBUF[ 2 ] = 0x07; // <HEARTBEAT>
EP8FIFOBUF[ 3 ] = 0x03; // <ETX>, packet end of text msg
SYNCDELAY;
EP8BCH = 0x00;
SYNCDELAY;
EP8BCL = 0x04; // pass src’d buffer on to host
}
else
{
history_record( EP8, BAD_MASTER );
}
}
… … … … …
Vue de la page 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 459 460

Commentaires sur ces manuels

Pas de commentaire