21.01.2014 Views

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Source <strong>Co</strong>de<br />

#pragma DATA_SEG DEFAULT<br />

extern void _Startup(void); /* execution begins in this procedure */<br />

/*--------------------------------------------------------------------*/<br />

#ifdef __cplusplus<br />

}<br />

#endif<br />

#endif<br />

;<br />

7.2.3 MAIN.H<br />

;<br />

/*****************************************************************************\<br />

* <strong>Co</strong>pyright (c) 2002, Motorola Inc.<br />

*<br />

* Motorola <strong>Co</strong>nfidential Proprietary<br />

*<br />

* ----------------------------------------------------------------------------*<br />

* File name : main.h *<br />

* Project name: Brushless DC Motor Drive with the MR8 Microcontroller<br />

*<br />

* ----------------------------------------------------------------------------*<br />

* Author : Jorge Zambada *<br />

* Email : Jorge.Zambada@motorola.com *<br />

* Department : Mexico Applications Lab - SPS *<br />

* *<br />

* Description : File subroutines and State Flags values are defined in this *<br />

* document. Macro definition and new type definition where *<br />

* added here *<br />

\*****************************************************************************/<br />

#define MOS_2_COM<br />

#undef MOS_3_COM<br />

// New Data type definitions<br />

typedef unsigned short int UINT16; // 16 bit unsigned integer (0, 65535)<br />

typedef signed short int SINT16; // 16 bit signed integer (-32768, 32767)<br />

typedef unsigned char UBYTE; // 8 bit unsigned byte (0, 255)<br />

typedef signed char SBYTE; // 8 bit signed byte (-128, 127)<br />

// Function Headers<br />

UBYTE ResolveButtons(void);<br />

// Macro Definitions<br />

#define Forever()<br />

#define EnableInterrupts()<br />

#define DisableInterrupts()<br />

while(1)<br />

{__asm CLI;}<br />

{__asm SEI;}<br />

DRM007<br />

BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />

110 Source <strong>Co</strong>de MOTOROLA

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!