summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/genmcf548x
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-12-17 08:42:17 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-12-17 08:42:17 +0000
commit39a9f8ea1294518df837c2f6a4586c1ca61945e2 (patch)
treebbcca399b1539adf14930593f22a73cd1aea01a9 /c/src/lib/libbsp/m68k/genmcf548x
parentadaption of calling convention to console my_driver_write function (diff)
downloadrtems-39a9f8ea1294518df837c2f6a4586c1ca61945e2.tar.bz2
adapted to new prototype for *_write function
Diffstat (limited to 'c/src/lib/libbsp/m68k/genmcf548x')
-rw-r--r--c/src/lib/libbsp/m68k/genmcf548x/ChangeLog5
-rw-r--r--c/src/lib/libbsp/m68k/genmcf548x/console/console.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog b/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog
index 680bc3ca04..87d4ce7c17 100644
--- a/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog
+++ b/c/src/lib/libbsp/m68k/genmcf548x/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-16 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+ * console/console.c: adapted to new prototype for *_write
+ function
+
2009-12-14 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* console/console.c, include/bsp.h, network/network.c: get vital
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;
}
/***************************************************************************