
3-24 FLEX Alphanumeric Chip MC68175 Interface
Software Development
Porting FLEX One-Way Stack to the MC68328 MPU
3.2.5 Retrieving Paging Messages from FLEX One-Way Stack
This section illustrates sample code acting as the host software running on the MCU.
When FLEX One-Way Stack software has a new paging message in the buffer, the main ()
and GetPage functions retrieve the message and display it to the user. These functions
also illustrate the API provided in the software. Function main () code is shown in
Example 3-11. Function Getpage code is shown in Example 3-12.
Example 3-11 Function main()
/************************************************************************
* FUNCTION NAME: main() *
* Date created: 07/26/96 *
* *
* Description: *
* This is the main module that controls the FLEXstack software *
* to communicate with the FLEXchip IC. *
* *
* INPUT: None *
* OUTPUT: None *
***********************************************************************/
main()
{
UVAR8 i;
/* Initialize the SPI communication module to enable FLEXchip */
_FlexICInit();
/*
* Initializes some global variables for storage of
* FLEX messages. The msgtable stores up to a certain number
* of message IDs, allowing the users to retrieve previously
* received messages.
*/
packet = (PACKET*) _Lmalloc((UVAR32)sizeof(PACKET));
for (i = 0; i < MSGTABLESZ; i++);
msgtable[i] = 0;
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Comentários a estes Manuais