11 months, 1 week ago.

Explanation: delay because of wait elsewhere...

Hi, i have the following piece of code:

MODSERIAL USB... 
...
    for (int ii = 0; ii < 10; ii++) {
      USB.printf("&%hu %hu %hu ",
		 Data[ii][0],
		 Data[ii][1],
		 Data[ii][2]);
    }
    USB.printf("\r\n");

the latter running in another loop.

If I put a wait_ms(10) *after* the last printf, then data transfer slows down because the line is not completed quickly. I would understand this if the wait is before the last printf but not if it is after that.

Any explanations?

Comment on this question
Be the first to answer this question.

You need to log in to post a question