Attention is currently required from: jolly, laforge, neels, osmith.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35172?usp=email )
Change subject: soft_uart: implement modem status lines and flow control ......................................................................
Patch Set 3:
(3 comments)
File include/osmocom/core/soft_uart.h:
https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/fd7a3d0e_d3e2e209 PS3, Line 54: OSMO_SUART_STATUS_F_CTS = (1 << 5), /*!< Clear To Send */
(personally i prefer an enum storing just 0, 1, 2, 3, 4, 5, because it is easy to get from 5 to 1<<5 […]
Yes, you already commented on this in another patch (already merged). As I said, I don't see a practical situation in which I would need to get the `x` value back from `(1 << x)`. If you have examples, let me know.
https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/d8e7e32d_f89679e9 PS3, Line 61: OSMO_SUART_FLOW_CTRL_M_NONE,
(apparently it's good practice to set the first item = 0 explicitly)
It's the first time I am hearing about such a good practice :P If this was a protocol definition, I would go further and set each item explicitly. In the particular case we're discussing here, I can't see the practical benefits.
https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/396a5a8c_71906e06 PS3, Line 100: gets
wdym, "gets". […]
"gets passed" or "gets as an argument" -- I will clarify this.