RTEMS | dev/serial: Refactor the pl011 driver to be extensible (!47)

Ning Yang (@yangn0) gitlab at rtems.org
Sun Jul 7 02:22:35 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_108802

 >  #include <dev/serial/arm-pl011.h>
 > +#include <bspopts.h>
 >  
 > -static volatile pl011 *pl011_get_regs(rtems_termios_device_context *base)
 > +static inline char arm_pl011_read_char(volatile pl011_base *regs_base)
 >  {
 > -  arm_pl011_context *ctx = (arm_pl011_context *) base;
 > +  return PL011_UARTDR_DATA_GET(regs_base->uartdr);
 > +}
 > +
 > +static inline void arm_pl011_write_char(volatile pl011_base *regs_base, const char ch)
 > +{
 > +  regs_base->uartdr = PL011_UARTDR_DATA_SET(regs_base->uartdr, ch);
 > +}
 > +
 > +inline bool arm_pl011_is_rxfifo_empty(volatile pl011_base *regs_base)

I think the BSP-specific pl011 driver may use these functions. But not yet, I have changed them back to static.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_108802
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/20240707/28ff8661/attachment-0001.htm>


More information about the bugs mailing list