TMS570: Return serial status when a byte is read

This commit is contained in:
Gregory Nutt
2015-12-25 08:47:12 -06:00
parent 6b1f3da01a
commit be99e773cf
2 changed files with 8 additions and 7 deletions
+2
View File
@@ -89,12 +89,14 @@ config TMS570_SCI1
bool "Serial Communication Interface 1 (SCI1)"
default n
select ARCH_HAVE_SCI1
select ARCH_HAVE_SERIAL_TERMIOS
config TMS570_SCI2
bool "Serial Communication Interface 2 (SCI2)"
default n
depends on TMS570_HAVE_SCI2
select ARCH_HAVE_SCI1
select ARCH_HAVE_SERIAL_TERMIOS
endmenu # TMS570 Peripheral Support
+6 -7
View File
@@ -735,12 +735,9 @@ static int tms570_receive(struct uart_dev_s *dev, uint32_t *status)
{
struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv;
/* Return the error information in the saved status.
*
* REVISIT: RX error information is not currently retained.
*/
/* Return the error information in the saved status. */
*status = 0;
*status = tms570_serialin(priv, TMS570_SCI_FLR_OFFSET);
/* Then return the actual received byte */
@@ -892,9 +889,11 @@ void up_serialinit(void)
tms570_disableallints(TTYS1_DEV.priv, NULL);
#endif
/* Configuration whichever one is the console */
#ifdef HAVE_SERIAL_CONSOLE
/* Configure whichever one is the console. NOTE: This was already done
* in tms570_lowsetup().
*/
CONSOLE_DEV.isconsole = true;
tms570_setup(&CONSOLE_DEV);