TMS320F28335 Library  1.0
Documentation
C:/Users/Kliewe/Desktop/CD1/CD1/workspace/TMS320F28335/global_defines.h
Go to the documentation of this file.
1 
6 #ifndef DEFINES_H_
7 #define DEFINES_H_
8 
9 /**********************************************************************************/
10 //Definition der Standard-Datentypen
11 /**********************************************************************************/
12 #ifndef C2000_DATA_TYPES
13 #define C2000_DATA_TYPES
14 // 8-Bit Datentypen nicht vorhanden
15 // nur 16-Bit addressierbar
16 typedef char int8;
17 typedef int int16;
18 typedef long int32;
19 typedef long long int64;
20 typedef unsigned char Uint8;
21 typedef unsigned int Uint16;
22 typedef unsigned long Uint32;
23 typedef unsigned long long Uint64;
24 typedef float float32;
25 typedef long double float64;
26 #endif
27 
28 // Compare list of standard control registers and generate the code to reference the control register
29 extern cregister volatile unsigned int IFR;
30 extern cregister volatile unsigned int IER;
31 extern void DSP28x_usDelay(Uint32 Count);
32 
33 // Makros
34 #define EINT asm(" clrc INTM")
35 #define DINT asm(" setc INTM")
36 #define ERTM asm(" clrc DBGM")
37 #define DRTM asm(" setc DBGM")
38 #define EALLOW asm(" EALLOW")
39 #define EDIS asm(" EDIS")
40 #define ESTOP0 asm(" ESTOP0")
41 
42 typedef enum {
45  True
47 
48 #define CPU_RATE 6.667L
49 #define F_CPU 150000000UL
50 #define F_CPU_HALF 75000000UL
51 #define F_LSPCLK 37500000UL
52 
53 typedef volatile Uint16 TM_REG16;
54 typedef volatile Uint32 TM_REG32;
55 
56 #define TM_CAST(a) (a)
57 #define REG_CAST(type,reg) ((type)&reg)
58 #define BIT(a) ((Uint32)1<<a)
59 
60 #define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / \
61  (long double)CPU_RATE) - 9.0L) / 5.0L)
62 
63 
64 /**********************************************************************************/
65 //Definition der Pins
66 /**********************************************************************************/
67 #define GPIO0 0
68 #define GPIO1 1
69 #define GPIO2 2
70 #define GPIO3 3
71 #define GPIO4 4
72 #define GPIO5 5
73 #define GPIO6 6
74 #define GPIO7 7
75 #define GPIO8 8
76 #define GPIO9 9
77 #define GPIO10 10
78 #define GPIO11 11
79 #define GPIO12 12
80 #define GPIO13 13
81 #define GPIO14 14
82 #define GPIO15 15
83 #define GPIO16 16
84 #define GPIO17 17
85 #define GPIO18 18
86 #define GPIO19 19
87 #define GPIO20 20
88 #define GPIO21 21
89 #define GPIO22 22
90 #define GPIO23 23
91 #define GPIO24 24
92 #define GPIO25 25
93 #define GPIO26 26
94 #define GPIO27 27
95 #define GPIO28 28
96 #define GPIO29 29
97 #define GPIO30 30
98 #define GPIO31 31
99 #define GPIO32 32
100 #define GPIO33 33
101 #define GPIO34 34
102 #define GPIO48 48
103 #define GPIO49 49
104 #define GPIO58 58
105 #define GPIO59 59
106 #define GPIO60 60
107 #define GPIO61 61
108 #define GPIO62 62
109 #define GPIO63 63
110 #define GPIO84 84
111 #define GPIO85 85
112 #define GPIO86 86
113 #define GPIO87 87
114 
115 #define ADCINA0 0
116 #define ADCINB0 1
117 #define ADCINA1 2
118 #define ADCINB1 3
119 #define ADCINA2 4
120 #define ADCINB2 5
121 #define ADCINA3 6
122 #define ADCINB3 7
123 #define ADCINA4 8
124 #define ADCINB4 9
125 #define ADCINA5 10
126 #define ADCINB5 11
127 #define ADCINA6 12
128 #define ADCINB6 13
129 #define ADCINA7 14
130 #define ADCINB7 15
131 
132 #endif /* DEFINES_H_ */
float32
float float32
32 Bit Variable: Dezimalzahl
Definition: global_defines.h:24
int16
int int16
16 Bit Variable: - 32.768 .. 32.767
Definition: global_defines.h:17
boolean
boolean
Enumeration for boolean-Type: False = 0, True = 1.
Definition: global_defines.h:43
IER
cregister volatile unsigned int IER
Generate reference to Interrupt Enable Register.
int8
char int8
8 Bit Variable: - 128 .. 127
Definition: global_defines.h:16
True
@ True
True = 1.
Definition: global_defines.h:45
Uint64
unsigned long long Uint64
64 Bit Variable: 0 .. 18.446.744.073.709.551.615
Definition: global_defines.h:23
False
@ False
False = 0.
Definition: global_defines.h:44
DSP28x_usDelay
void DSP28x_usDelay(Uint32 Count)
Declare Delay-Function for usage with Assembly Instruction.
float64
long double float64
64 Bit Variable: Dezimalzahl
Definition: global_defines.h:25
Uint16
unsigned int Uint16
16 Bit Variable: 0 .. 65.535
Definition: global_defines.h:21
int32
long int32
32 Bit Variable: - 2.147.483.648 .. 2.147.483.647
Definition: global_defines.h:18
Uint8
unsigned char Uint8
8 Bit Variable: 0 .. 255
Definition: global_defines.h:20
TM_REG16
volatile Uint16 TM_REG16
Hardware register definition.
Definition: global_defines.h:53
int64
long long int64
64 Bit Variable: - 9.223.372.036.854.775.808 .. 9.223.372.036.854.775.807
Definition: global_defines.h:19
TM_REG32
volatile Uint32 TM_REG32
Hardware register definition.
Definition: global_defines.h:54
IFR
cregister volatile unsigned int IFR
Generate reference to Interrupt Flag Register.
Uint32
unsigned long Uint32
32 Bit Variable: 0 .. 4.294.967.295
Definition: global_defines.h:22