Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35044?usp=email )
Change subject: soft_uart: implement the transmitter ......................................................................
Patch Set 2: Code-Review-1
(1 comment)
File src/core/soft_uart.c:
https://gerrit.osmocom.org/c/libosmocore/+/35044/comment/805a3c8e_44104bba PS2, Line 209: size_t osmo_soft_uart_tx(struct osmo_soft_uart *suart, how does this reject any buffer overflows? It is difficult to manage transmission with a buffer, IMHO. I would suggest to let the user of this API manage the data and simply call a function every time the transmitter wants to pull data out of the application-side buffer. This way it's up to the application to manage the size of the buffer, any kind of prioritization of different data, the overflow/overrun semantics, etc.
Yes, that would mean one function call-back for each byte the transmitter pulls out of that buffer. If that really turns out to be a performance problem (probably with hundreds of parallel uarts, if we ever need that) we might want to pull multiple bytes at the same time. But in any case, I think we hve a fixed bit-rate consumer of data (the transmitter) and it should pull data.