-
Notifications
You must be signed in to change notification settings - Fork 0
/
projectglobals.h
executable file
·115 lines (96 loc) · 4.83 KB
/
projectglobals.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/******************************************************************************
* COPYRIGHT (c) MOTOROLA 2003
* FILE NAME: projectglobals.h
*
* PURPOSE: header file for project level defines global variables
* and includes module drivers.
*
* DESCRIPTION: project setup (peripherals and drivers)
*
* NOTE: Modify this file to specify which maskset peripheral you are using by
* uncommenting desired maskset peripheral file. Also uncomment the
* drivers which are used by your main application.
*
* AUTHOR: r9aabe LOCATION: Austin,TX LAST EDIT DATE: 05/12/03
*
******************************************************************************/
#ifndef PROJECTGLOBALS_H /*prevent duplicated includes*/
#define PROJECTGLOBALS_H
/*****************************************************************************/
/*Global Includes */
/*****************************************************************************/
#include <hidef.h> //Includes Code Warrior definitions
#include "projectvectors.h" //Includes Vector prototypes
/*****************************************************************************/
/* MCU_Maskset Selection: Uncomment one Target MCU_Maskset for */
/* Development from the list of HCS12 Families */
/*****************************************************************************/
#define DP256_K79X
/******************************************************************************
* ROUTINE: MCU Peripherals
*
* DESCRIPTION: includes MCU_Maskset peripheral file from project
* definitions library.
*
* NOTE: Modify by selecting which maskset to include into your main
* application by uncommenting the appropriate define at the top
* of projectglobals.h (MCU_Maskset Selection)
*
******************************************************************************/
#ifdef DP256_K79X
#include "per_DP256_K79X.h"
#define Flash_Sector_Size 0x200
#endif /*DP256_K79X*/
/*****************************************************************************/
/*Macro Definitions (Defines below are functional examples) */
/*****************************************************************************/
#define int_enable() {asm andcc #0xEF;} //interrupts enabled
#define int_disable() {asm orcc #0x10;} //interrupts disabled
#define wait() {asm wait;} //enter wait mode
#define stop_enable() {asm andcc #0x7F;} //stop mode enabled
#define stop() {asm stop;} //enter stop mode
#define nop() {asm nop;} //enter NOP asm instruction
#define bgnd() {asm bgnd; asm nop;} //enter BGND asm instruction
#define ON 1 //ON
#define OFF 0 //OFF
#define TRUE 1 //TRUE
#define FALSE 0 //FALSE
#define PASS 0u //PASS
#define FAIL 1u //FAIL
#define SET 1u //SET
#define CLEAR 0u //CLEAR
/*****************************************************************************/
/*Software Driver Selection: Uncomment necessary peripheral drivers */
/* (Defines below are listed as examples) */
/*****************************************************************************/
//#define ECT
//#define LCD
//#define PWM
//#define SCI
/******************************************************************************
* ROUTINE: Driver Includes
*
* DESCRIPTION: includes from project driver library
*
* NOTE: Modify by selecting which drivers to include into your main
* application by uncommenting the appropriate define at the top
* of projectglobals.h (Software Driver Selection)
* (Defines below are listed as examples)
*
******************************************************************************/
#ifdef ECT
#include "ectdrv.h"
#endif /*ECT*/
#ifdef LCD
#include "lcddrv.h"
#endif /*LCD*/
#ifdef PWM
#include "pwmdrv.h"
#endif /*PMW*/
#ifdef SCI
#include "scidrv.h"
#include "sci0_isr.h"
extern tU32 oscclk, pllclk, busclk;
extern float sci_clk;
#endif /*SCI*/
#endif /*PROJECTGLOBALS_H*/