Attention is currently required from: fixeria.
Patch set 2:Code-Review -1
1 comment:
File src/core/soft_uart.c:
Patch Set #2, 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.
To view, visit change 35044. To unsubscribe, or for help writing mail filters, visit settings.