Motorola MC68328 Informações Técnicas Página 37

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 44
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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...
Vista de página 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 43 44

Comentários a estes Manuais

Sem comentários