Motorola MC68328 Technical Information Seite 37

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 44
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 36
Software Development
Porting FLEX One-Way Stack to the MC68328 MPU
FLEX Alphanumeric Chip MC68175 Interface 3-19
Send_4_bytes() supervises the interrupt process and will terminate after the transfer is
completed.
FLEXstack()
The FLEXstack function checks the circular packet queue for new data (by checking
gPackWrite and gPackRead indexes, as described in earlier section). If new data are in the
queue, it calls FStkPacketProcessing to process one packet.
A loop should wrap around FStkPacketProcessing to process all new information in the
circular queue.
Example 3-8 Function Send_4_bytes() Sample
void Send_4_bytes (void)
{
BCLR(gFlag1, XFERDONE_f1);
/* Select the FLEXchip IC to initiate the communication */
portj_dat = (UVAR8*) PJDATA;
*portj_dat &= ASSERT_SS;
/* Wait until the data transfer is complete */
while(!BTST(gFlag1, XFERDONE_f1));
}
Example 3-9 Function FStkPacketProcessing Sample
void FLEXstack()
{
while (gPackWrite != gPackRead)
FStkPacketProcessing(GetPacket());
}
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Seitenansicht 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 43 44

Kommentare zu diesen Handbüchern

Keine Kommentare