
3-16 FLEX Alphanumeric Chip MC68175 Interface
Software Development
Porting FLEX One-Way Stack to the MC68328 MPU
Example 3-5 Function waitForTransfer()
/************************************************************************
* FUNCTION NAME: waitForTransfer() *
* Date created: 07/26/96 *
* *
* DESCRIPTIONS: *
* This function checks the SPIM_IRQ bit (in the SPI status register), *
* after data has been moved to the SPI data register to be transmitted *
* to the FLEXchip. When the SPI finishes the transmission, it sets *
* the SPIM_IRQ bit. By checking this bit, we can monitor the *
* SPI communication. *
* *
* INPUT: None *
* OUTPUT: None *
***********************************************************************/
void waitForTransfer()
{
while (!(*spmode & SPIM_IRQ_BIT));
/* Reset SPIM */
*spmode &= SPIM_IRQ_MASK;
*spmode &= XCH_MASK;
return;
}
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Comentarios a estos manuales