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/mrm332 | |
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 'c/src/lib/libbsp/m68k/mrm332')
-rw-r--r-- | c/src/lib/libbsp/m68k/mrm332/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mrm332/console/sci.c | 34 |
2 files changed, 22 insertions, 17 deletions
diff --git a/c/src/lib/libbsp/m68k/mrm332/ChangeLog b/c/src/lib/libbsp/m68k/mrm332/ChangeLog index 54866faea0..e9eed33adb 100644 --- a/c/src/lib/libbsp/m68k/mrm332/ChangeLog +++ b/c/src/lib/libbsp/m68k/mrm332/ChangeLog @@ -1,3 +1,8 @@ +2009-12-16 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> + + * console/sci.c: adapted to new prototype for *_write + function + 2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org> * make/custom/mrm332.cfg: Remove RTEMS_BSP_FAMILY. diff --git a/c/src/lib/libbsp/m68k/mrm332/console/sci.c b/c/src/lib/libbsp/m68k/mrm332/console/sci.c index c41f480e86..3460d567f7 100644 --- a/c/src/lib/libbsp/m68k/mrm332/console/sci.c +++ b/c/src/lib/libbsp/m68k/mrm332/console/sci.c @@ -154,15 +154,15 @@ rtems_device_driver SciControl( /* device driver api */ rtems_device_driver SciRead ( rtems_device_major_number, rtems_device_minor_number, void *); -int SciInterruptOpen(int, int, void *); /* termios api */ -int SciInterruptClose(int, int, void *); /* termios api */ -int SciInterruptWrite(int, const char *, int); /* termios api */ +int SciInterruptOpen(int, int, void *); /* termios api */ +int SciInterruptClose(int, int, void *); /* termios api */ +ssize_t SciInterruptWrite(int, const char *, size_t); /* termios api */ -int SciSetAttributes(int, const struct termios*); /* termios api */ -int SciPolledOpen(int, int, void *); /* termios api */ -int SciPolledClose(int, int, void *); /* termios api */ -int SciPolledRead(int); /* termios api */ -int SciPolledWrite(int, const char *, int); /* termios api */ +int SciSetAttributes(int, const struct termios*); /* termios api */ +int SciPolledOpen(int, int, void *); /* termios api */ +int SciPolledClose(int, int, void *); /* termios api */ +int SciPolledRead(int); /* termios api */ +ssize_t SciPolledWrite(int, const char *, size_t); /* termios api */ static void SciSetBaud(uint32_t rate); /* hardware routine */ static void SciSetDataBits(uint16_t bits); /* hardware routine */ @@ -615,10 +615,10 @@ int SciInterruptClose( * Scope: public API ****************************************************************************/ -int SciInterruptWrite( +ssize_t SciInterruptWrite( int minor, const char *buf, - int len + size_t len ) { /* We are using interrupt driven output so termios only sends us */ @@ -626,17 +626,17 @@ int SciInterruptWrite( if ( !len ) /* no data? */ { - return 0; /* return error */ + return -1; /* return error */ } if ( minor != SCI_MINOR ) /* check the minor dev num */ { - return 0; /* return error */ + return -1; /* return error */ } if ( SciOpened == DRIVER_OPENED ) /* is the driver api open? */ { - return 1; /* yep, throw this away */ + return -1; /* yep, throw this away */ } SciWriteCharNoWait(*buf); /* try to send a char */ @@ -645,7 +645,7 @@ int SciInterruptWrite( SciEnableTransmitInterrupts(); /* enable the tx interrupt */ - return 1; /* return success */ + return 0; /* return success */ } @@ -860,13 +860,13 @@ int SciPolledRead( * Scope: public termios API ****************************************************************************/ -int SciPolledWrite( +ssize_t SciPolledWrite( int minor, const char *buf, - int len + size_t len ) { - int32_t written = 0; + ssize_t written = 0; if ( minor != SCI_MINOR ) /* check minor device num */ { |