[an error occurred while processing this directive]
|
------------------------------------------------------ #define M_PORT1 PORTA unsigned int flash effect1[10] = {0,4095, 4095,0, 0,32768, 4095,0, 0,4095}; void Show_bytes(unsigned int aa, unsigned int bb) void pause(unsigned int time){ void Show_Sequence(unsigned char tacts) pause(2000); void test(void){ void main(void){ }
E-mail:
info@telesys.ru
#include
#include
#define M_PORT2 PORTC
#define H_PORT1 PORTB
#define H_PORT2 PORTD
{
H_PORT1 = aa & 0xFF;
H_PORT2 = aa >> 8;
M_PORT1 = bb & 0xFF;
M_PORT2 = bb >> 8;
}
char aaa;
do {
for(aaa=0;aaa<25;aaa++) _NOP();
time--;
} while(time > 0);
}
{
unsigned char idx;
idx = 0;
do {
Show_bytes(effect1[idx],effect1[idx+1]);
idx += 2;
tacts --;
} while(tacts > 0);
}
Show_Sequence(5);
}
DDRD = 0xFF;
DDRB = 0xFF;
DDRA = 0xFF;
DDRC = 0xFF;
Show_Sequence(5);
while(1) {
test();
// Show_Sequence(5);
}
------------------------------------------
Если вызывать Show_Sequence() просто из майна, то все ок. А если через test() то усе виснет...
Ответы