<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 5, 2021 at 11:42 AM Jan Sommer <<a href="mailto:jan.sommer@dlr.de">jan.sommer@dlr.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">v3:<br>
- Make sure the baud registers are not modified for baud rate B0<br></blockquote><div><br></div><div>B0 is an odd bird. It indicates hang up. From <a href="https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/tcsetattr.html">https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/tcsetattr.html</a>:<br><br><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px">If the output baud rate stored in the <b>termios</b> structure pointed to by <i>termios_p</i> is the zero baud rate, B0, the modem control lines shall no longer be asserted. Normally, this shall disconnect the line.</p><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px">If the input baud rate stored in the <b>termios</b> structure pointed to by <i>termios_p</i> is 0, the input baud rate given to the hardware is the same as the output baud rate stored in the <b>termios</b> structure.</p><br class="gmail-Apple-interchange-newline">Since we don't likely have any BSPs which have real modem control </div><div>lines on the serial ports, that usually means to ignore it so you don't</div><div>end up with a divide by 0 on the baud rate divisor calculations.</div><div><br></div><div>I'm not saying anything negative about your patches. Just that B0 is</div><div>a weird corner of POSIX and computing history.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
v2:<br>
- Use rtems_baud_to_number instead of duplicating baud table<br>
<br>
This patch allows to set the baud rate of the zynq-uart using the termios API.<br>
I could change the baud rate successfully on hardware using the termios application.<br>
<br>
Best regards,<br>
<br>
Jan<br>
<br>
<br>
Jan Sommer (1):<br>
bsps/shared: Allow setting baud rate for zynq uart<br>
<br>
bsps/shared/dev/serial/zynq-uart.c | 21 ++++++++++++++++-----<br>
1 file changed, 16 insertions(+), 5 deletions(-)<br>
<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>