Motorola MC68328 Technical Information Seite 35

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 44
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 34
Software Development
Porting FLEX One-Way Stack to the MC68328 MPU
FLEX Alphanumeric Chip MC68175 Interface 3-17
3.2.2 Configuring PORT.H
The PORT.H file contains most of the options and configurable items, depending on the
processor type. In
PORT.H, product engineers should add the definitions shown in
Example 3-6 when porting FLEX One-Way Stack software to the Dragonball processor:
3.2.3 Completing PORT.C
Some routines in PORT.C are product dependent and must be completed for FLEX
One-Way Stack to perform properly for a particular application. We describe some
important functionalities in this file. Recommended code is also included. However, the
product engineer should examine this code carefully, and use it basically as reference to
design applicable products.
To complete
PORT.C, three functions are called upon: FStkNotifyNewMsg() ,
Send_4_bytes() , and FLEXstack(). Code samples of the three functions are shown in
Examples 3-7 through 3-9.
Example 3-6 PORT.H Definitions
#define DRAGONBALL
#ifdef DRAGONBALL
typedef UVAR8 *ADDRESS; /* UVAR8 is an unsigned 8-bit value */
typedef UVAR8 *HANDLE;
typedef short VAR16; /* Type short is a 16-bit value */
typedef int VAR32; /* Type int is a 32-bit value */
typedef unsigned short UVAR16;
typedef unsigned int UVAR32;
#define PTR_SIZE 4 /* machine pointer size in bytes */
#define printf /* override printf */
#define ENABLE_INT asm(" ANDI.W #$F8FF,SR") /* Enable interrupts */
#define DISABLE_INT asm(" ORI.W #$0700,SR") /* Disable interrupts */
#define ATTRIB_BUF 0 /* No temp attrib buffer needed */
#endif /* DRAGONBALL */
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Seitenansicht 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 43 44

Kommentare zu diesen Handbüchern

Keine Kommentare