RTEMS | dev/serial: Refactor the pl011 driver to be extensible (!47)
Ning Yang (@yangn0)
gitlab at rtems.org
Thu Aug 15 17:42:46 UTC 2024
Ning Yang commented on a discussion on bsps/shared/dev/serial/arm-pl011.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111103
> +
> + /* enable FIFO */
> + lcrh = lcrh | PL011_UARTLCR_H_FEN;
> +
> + /* Mode: parity */
> + if ((term->c_cflag & PARENB) != 0) {
> + lcrh |= PL011_UARTLCR_H_PEN;
> +
> + if ((term->c_cflag & PARODD) == 0)
> + lcrh |= PL011_UARTLCR_H_EPS;
> + }
> +
> + /* Mode: character size */
> + switch (term->c_cflag & CSIZE) {
> + case CS5:
> + lcrh = PL011_UARTLCR_H_WLEN_SET(lcrh, PL011_UARTLCR_H_WLEN_5);
bsps/aarch64/xilinx-versal/dev/serial/versal-uart.c line312
It also uses `=`.
I think `PL011_UARTLCR_H_WLEN_SET` will retain the original value of `lcrh`.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111103
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240815/0ecf622b/attachment-0001.htm>
More information about the bugs
mailing list