diff options
Diffstat (limited to 'c/src/lib/libcpu/powerpc/ppc403/console/console.c')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ppc403/console/console.c | 7 |
1 files changed, 5 insertions, 2 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; } |