diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-12-17 08:42:17 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-12-17 08:42:17 +0000 |
commit | 39a9f8ea1294518df837c2f6a4586c1ca61945e2 (patch) | |
tree | bbcca399b1539adf14930593f22a73cd1aea01a9 /c/src/lib/libbsp/m68k/genmcf548x/console/console.c | |
parent | adaption of calling convention to console my_driver_write function (diff) | |
download | rtems-39a9f8ea1294518df837c2f6a4586c1ca61945e2.tar.bz2 |
adapted to new prototype for *_write function
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/m68k/genmcf548x/console/console.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/console/console.c b/c/src/lib/libbsp/m68k/genmcf548x/console/console.c index 1cb1a57f9f..616892bc74 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/console/console.c +++ b/c/src/lib/libbsp/m68k/genmcf548x/console/console.c @@ -68,7 +68,7 @@ MCF548X_PSC_SR_PE_CRCERR | \ MCF548X_PSC_SR_OE ) -static int IntUartPollWrite(int minor, const char *buf, int len); +static ssize_t IntUartPollWrite(int minor, const char *buf, size_t len); static int IntUartPollRead (int minor); static void @@ -525,8 +525,8 @@ IntUartInitialize(void) to initiate a transmit sequence. Calling this routine enables Tx interrupts. ***************************************************************************/ -static int -IntUartInterruptWrite (int minor, const char *buf, int len) +static ssize_t +IntUartInterruptWrite (int minor, const char *buf, size_t len) { int level; @@ -674,9 +674,10 @@ if (!((MCF548X_PSC_SR(minor) & MCF548X_PSC_SR_RXRDY))) appropriate internal uart channel waiting till each one is sucessfully transmitted. ***************************************************************************/ -static int -IntUartPollWrite (int minor, const char *buf, int len) +static ssize_t +IntUartPollWrite (int minor, const char *buf, size_t len) { + size_t retval = len; /* loop over buffer */ while ( len-- ) { @@ -686,7 +687,7 @@ IntUartPollWrite (int minor, const char *buf, int len) /* transmit data byte */ *((uint8_t *)&MCF548X_PSC_TB(minor)) = *buf++; } - return 0; + return retval; } /*************************************************************************** |