habe folgende Error-Meldungen bekommen beim kompilieren:
dtex.c(8): error C141: syntax error near 'T0INT', expected 'const'
dtex.c(10): error C132: 'T0INT': not in formal parameter list
dtex.c(10): error C141: syntax error near 'if'
dtex.c(11): error C132: 'TF0': not in formal parameter list
dtex.c(11): error C141: syntax error near '{'
dtex.c(12): error C244: 'P5_0': can't initialize, bad type or class
dtex.c(12): error C132: 'P5_0': not in formal parameter list
dtex.c(13): error C244: 'TH0': can't initialize, bad type or class
dtex.c(13): error C132: 'TH0': not in formal parameter list
dtex.c(14): error C244: 'TL0': can't initialize, bad type or class
dtex.c(14): error C132: 'TL0': not in formal parameter list
dtex.c(15): error C244: 'TF0': can't initialize, bad type or class
dtex.c(15): error C132: 'TF0': not in formal parameter list
dtex.c(16): error C244: 'P5_0': can't initialize, bad type or class
dtex.c(16): error C132: 'P5_0': not in formal parameter list
für folgenden code über dem main:
1 | #include <REG509.H>
|
2 |
|
3 | sbit P5_0 = P5^0;
|
4 | sbit P5_1 = P5^1;
|
5 |
|
6 | void int_handler(void) interrupt T0INT
|
7 | {
|
8 | if (TF0)
|
9 | {
|
10 | P5_0 = 1;
|
11 | TH0 = 0xFF;
|
12 | TL0 = 0x0E;
|
13 | TF0 = 0;
|
14 | P5_0 = 0;
|
15 | }
|
16 | }
|