Motorola MC68328 Technical Information Seite 39

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 44
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 38
Software Development
Porting FLEX One-Way Stack to the MC68328 MPU
FLEX Alphanumeric Chip MC68175 Interface 3-21
/* Create FLEXstack Driver Initialization module */
ptr1 = (FS_DRIVER_STRUCT *)
_malloc((UVAR32)sizeof(FS_DRIVER_STRUCT));
ptr1->fs_driver_hdr.size = sizeof(FS_DRIVER_STRUCT);
ptr1->fs_driver_hdr.flag = 0;
ptr1->fs_driver_hdr.type = 1;
ptr1->fs_driver_data.msgStorSize = STATUS_TABLE_SIZE;
ptr1->fs_driver_data.msgBldSize = MESSAGE_BLD_SIZE;
ptr1->fs_driver_data.msgstraddr = (void*)
_malloc((UVAR32)STATUS_TABLE_SIZE * sizeof(UCHAR));
ptr1->fs_driver_data.msgbldaddr = (void*)
_malloc((UVAR32)MESSAGE_BLD_SIZE * sizeof(UCHAR));
/* The pointer to this module is the beginning of the
initialization buffer */
init_buffer = (UVAR8*) ptr1;
/* Create Event Notification module */
ptr2 = (E_NOTIFY_STRUCT *)
_malloc((UVAR32)sizeof(E_NOTIFY_STRUCT));
ptr1->fs_driver_hdr.next = (UVAR8*) ptr2;
ptr2->e_notify_hdr.size = sizeof(E_NOTIFY_STRUCT);
ptr2->e_notify_hdr.flag = 0;
ptr2->e_notify_hdr.type = 2;
ptr2->e_notify_data.FChipMask = 0;
ptr2->e_notify_data.FStackMask = 0;
ptr2->e_notify_data.BIWMask = 0;
/* create Message Manager Lite module */
ptr3 = (MMLITE_STRUCT *) _malloc((UVAR32)sizeof(MMLITE_STRUCT));
ptr2->e_notify_hdr.next = (UVAR8*) ptr3;
ptr3->mmlite_hdr.size = sizeof(MMLITE_STRUCT);
ptr3->mmlite_hdr.flag = 0;
ptr3->mmlite_hdr.type = 5;
ptr3->mmlite_data.numNodes = 0x009E;
ptr3->mmlite_data.nodeSize = 0x0020;
ptr3->mmlite_data.poolStartAddress = (UVAR8*)
_malloc((UVAR32)NUM_NODES * NODE_SIZE * sizeof(UCHAR));
ptr3->mmlite_data.maxHdls = 0x10;
ptr3->mmlite_data.hdlPoolAddress = (UVAR8*)
_malloc((UVAR32)MAX_HANDLES * NUM_MSGS * sizeof(UCHAR));
Example 3-10 Function BuildInitBuffer() (Continued)
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Seitenansicht 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44

Kommentare zu diesen Handbüchern

Keine Kommentare