diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-24 17:29:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-25 17:03:21 +0200 |
commit | e18db9f0cffcb143e5fdec27539efb417cb4ebf3 (patch) | |
tree | 804edba552541bea8d5ea5c38680903373bf6c27 /c/src/lib/libcpu/powerpc/ppc403 | |
parent | bsps/arm: Rename function (diff) | |
download | rtems-e18db9f0cffcb143e5fdec27539efb417cb4ebf3.tar.bz2 |
termios: Update due to API changes
Termios notifies now the driver about an inactive transmit with the
length argument set to zero.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/console/console.c | 7 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/console/console405.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c b/c/src/lib/libcpu/powerpc/ppc403/console/console.c index 58d0138398..0e74879947 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c +++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c @@ -271,8 +271,11 @@ spiPollRead (int minor) static int spiInterruptWrite (int minor, const char *buf, int len) { - port->SPTB = *buf; /* write char to send */ - port->SPTC |= TCRIntEnabled; /* always enable tx interrupt */ + if (len > 0) { + port->SPTB = *buf; /* write char to send */ + port->SPTC |= TCRIntEnabled; /* always enable tx interrupt */ + } + return 0; } diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console405.c b/c/src/lib/libcpu/powerpc/ppc403/console/console405.c index 033a9ef41e..206d209c82 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/console/console405.c +++ b/c/src/lib/libcpu/powerpc/ppc403/console/console405.c @@ -296,8 +296,11 @@ spiStopRemoteTx (int minor) static ssize_t InterruptWrite (int minor, const char *buf, size_t len) { - port->IER |= IER_XMT; /* always enable tx interrupt */ - port->THR = *buf; /* write char to send */ + if (len > 0) { + port->IER |= IER_XMT; /* always enable tx interrupt */ + port->THR = *buf; /* write char to send */ + } + return 0; } |