incorrect macro in buffered SIO
Posted: Fri Jan 30, 2026 2:49 pm
Hi,
context : last ChibiOS 21.11 stable and hit a compile error when calling bsioReadI().
File: os/hal/lib/complex/buffered_sio/hal_buffered_sio.h
Current macro:
But iqReadI() is declared as:
So the macro passes one extra argument and fails to compile
It seems the macro should be either:
or (if timeout is intended, then in thread context):
I worked around it locally by calling iqReadI() directly.
I am converting a project that use SD and USART driver to only use SIO, so I will probably discover another subtleties, should I create a new topic each time, or is it better to keep all SIO/BSIO report in the same topic ?
Alexandre
context : last ChibiOS 21.11 stable and hit a compile error when calling bsioReadI().
File: os/hal/lib/complex/buffered_sio/hal_buffered_sio.h
Current macro:
Code: Select all
#define bsioReadI(bsiop, b, n) iqReadI(&(bsiop)->iqueue, b, n, TIME_INFINITE)But iqReadI() is declared as:
Code: Select all
size_t iqReadI(input_queue_t *iqp, uint8_t *bp, size_t n);So the macro passes one extra argument and fails to compile
It seems the macro should be either:
Code: Select all
#define bsioReadI(bsiop, b, n) iqReadI(&(bsiop)->iqueue, b, n)or (if timeout is intended, then in thread context):
Code: Select all
#define bsioReadI(bsiop, b, n) iqReadTimeout(&(bsiop)->iqueue, b, n, TIME_INFINITE)I worked around it locally by calling iqReadI() directly.
I am converting a project that use SD and USART driver to only use SIO, so I will probably discover another subtleties, should I create a new topic each time, or is it better to keep all SIO/BSIO report in the same topic ?
Alexandre