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.
Hi all, While I compiled the code, I got a message as shown below:
CAN_LPC1857.c(167): error: #29: expected an expression
The compiled code is :
uint8_t i; uint8_t tx_data[8]; tx_data[] = {01, 02, 03, 04, 05, 06, 07, 08}; for(i=0; i<7;i++) { ptrCAN->MessageSend(tx_obj_idx, &tx_msg_info, tx_data[i], 8U); }
Can anybody help me in this flow.
What the %*%$ is tx_obj_idx and tx_msg_info ???
You can not assign to an entire array like this:
tx_data[] = {01, 02, 03, 04, 05, 06, 07, 08};
You need to re-read the section in your 'C' textbook about initialising arrays ...
Here are some 'C' learning & reference materials for you - including a free online 'C' textbook: blog.antronics.co.uk/.../