[Patch] bsp/tms570/sci: fix bug in tms570_sci_read_received_chars()

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jan 25 19:29:23 UTC 2024


Hello Adrien,

the change looks good. I would remove the 
tms570_sci_read_received_chars() and TMS570_SCI_BUFFER_SIZE:

static void tms570_sci_interrupt_handler(void * arg)
{
   rtems_termios_tty *tty = arg;
   tms570_sci_context *ctx = rtems_termios_get_device_context(tty);

   /*
    * Check if we have received something.
    */
   if ( (ctx->regs->FLR & TMS570_SCI_FLR_RXRDY ) == TMS570_SCI_FLR_RXRDY ) {
     char buf[1];

     buf[0] = ctx->regs->RD;
     rtems_termios_enqueue_raw_characters(tty, buf, 1);
   }
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list