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.
When I compile the Mailbox example of RTL-RTX, I got a error message:
main.c(36): error: #167: argument of type "U32 **" is incompatible with parameter of type "void **"
Why? How can I resolve this problem? Thanks.
Here is the source code:
#include <RTL.h> ... void rec_task(void) __task { /* This task will receive a message. */ U32 *rptr, rec_val[2]; os_mbx_wait(MsgBox, &rptr, 0xffff); /* error! */ rec_val[0] = rptr[0]; rec_val[1] = rptr[1]; _free_box(mpool, rptr); os_tsk_delete_self(); }
The concept of "casting" or, more fully, "type-casting" is fundamental in 'C' - look it up in any good 'C' textbook...