Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
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
"pdata" is a C51 keyword.
http://www.keil.com/support/man/docs/c51/c51_le_keywords.htm