nanoMODBUS icon indicating copy to clipboard operation
nanoMODBUS copied to clipboard

Comment clarity

Open joegittingherdone opened this issue 5 months ago • 3 comments

I see lines:

nmbs->platform.read(nmbs->msg.buf, sizeof(nmbs->msg.buf), 0, nmbs->platform.arg);

Should the user's read and write callbacks empty the nmbs->msg.buf and the hardware's UART buffers when the timeout parameter is zero? The comment in nanomodbus.h doesn't say to do this:

Both methods should block until either:
- count bytes of data are read/written
- the byte timeout, with byte_timeout_ms >= 0, expires

joegittingherdone avatar Sep 20 '24 16:09 joegittingherdone