How to pass array as parameter to macro
Posted: Tue Oct 16, 2018 3:32 pm
Hello!
I need help on passing an array as a parameter. It seems real simple, but I can't figure it out on flowcode at the moment. The array is set as a global byte msg[255].
I have one call needing to go as "crc_out(msg[], timeout, true)" but I cant get the array(msg[]) to pass.
Then the next should go as "crc = CalcCRC(msg_len + 2, &msg[1])" but the "&msg[1]" wont go through. Neither would "msg[1]" if I tried.
And finally, the CalcCRC macro should read in those parameters as "crc = CalcCRC(LEN, *u8Buf)".
How can I make flowcode macros understand passing arrays or address/pointer of arrays through?? Please help and thank you in advance.
I need help on passing an array as a parameter. It seems real simple, but I can't figure it out on flowcode at the moment. The array is set as a global byte msg[255].
I have one call needing to go as "crc_out(msg[], timeout, true)" but I cant get the array(msg[]) to pass.
Then the next should go as "crc = CalcCRC(msg_len + 2, &msg[1])" but the "&msg[1]" wont go through. Neither would "msg[1]" if I tried.
And finally, the CalcCRC macro should read in those parameters as "crc = CalcCRC(LEN, *u8Buf)".
How can I make flowcode macros understand passing arrays or address/pointer of arrays through?? Please help and thank you in advance.