Hi my question is maybe simple but very important for my knowledge and my code structure. If I sent a array with UART like this example:
byte array[3];
array[0]=4;
array[1]=4;
array[2]=4;
Serial1.write(array,3); //send 3 bytes of the array
array[2]=0;
I know the UART is asynchronous so the UART begin to send in background when the line "array[2]=0;" is executed. In this situation if array is transfered by value to the function write, bytes sended will be 4,4,4. But if array is transfered by reference bytes sended will be 4,4,0.
So Serial1.write parameter array is by value or reference?
Thank you!