We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I try to compile ucOSII in keil C51. But it tells me a error at
struct os_event { UBYTE OSEventGrp; /* Group corresponding to tasks waiting for event to occur */ UBYTE OSEventTbl[8]; /* List of tasks waiting for event to occur */ UWORD OSEventCnt; /* Count of used when event is a semaphore */ far void *OSEventPtr; /* };
"Can anyone tell me how to use far and near to define a pointer?" Read the Manual - does Keil C51 support 'far' and 'near' pointers? As I keep saying, This is why you should always encapsulate all your compiler dependencies in #defines!! http://www.keil.com/forum/docs/thread1675.asp http://www.keil.com/forum/docs/thread31.asp http://www.keil.com/forum/docs/thread3000.asp It may be beyond your control, but "UWORD" is a bad name for a type, since "Word" is ambiguous - it could mean 16 bits on a 16-bit machine, 24 bits on a 24-bit machine, 32 bits on a 32-bit machine, etc, etc,...