void OS_TaskIdle (void *pdata) its a function from MicroC-OS and givingerror like : TEST.C(5): error C141: syntax error near ')'. ---the code follows-------- static void OS_TaskIdle (void *pdata) { //#if OS_CRITICAL_METHOD == 3 // Allocate storage for CPU status register // OS_CPU_SR cpu_sr; //#endif
pdata = pdata; // Prevent compiler warning for not using 'pdata' // for (;;) { // OS_ENTER_CRITICAL(); // OSIdleCtr++; // OS_EXIT_CRITICAL(); // OSTaskIdleHook(); // Call user definable HOOK // } }
void Init_ports() { P0 = 0x00; P1 = 0x00; P2 = 0x00; P3 = 0x00; }
void Init_UART() { SCON = 0x52; // SCON setup serial port control TMOD = 0x20; // TMOD hardware (2400 BAUD @12MHZ) TCON = 0x69; // TCON TH1 = 0xfd; // TH1 TL1 = 0xfd; // TH1 printf ("\n\nC compiler demonstration program\n\n"); }
void main() { unsigned char i=0; unsigned int h=0x0; Init_ports(); Init_UART();
OS_TaskIdle();
while(1); }
plz giv me suggestion i am justing porting Micro C/OS to 8051 controller