From 73d075e2f2a3f8527d6e76cf821e41854c68688e Mon Sep 17 00:00:00 2001 From: jesusc Date: Sat, 28 Oct 2006 05:33:58 +0000 Subject: [PATCH] device/lib/_putchar.c,_getchar.c, inituart.c: removed git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4439 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 7 ++++++- device/lib/Makefile.in | 2 +- device/lib/_getchar.c | 36 ------------------------------------ device/lib/_putchar.c | 40 ---------------------------------------- device/lib/inituart.c | 33 --------------------------------- device/lib/libsdcc.lib | 3 --- 6 files changed, 7 insertions(+), 114 deletions(-) delete mode 100644 device/lib/_getchar.c delete mode 100644 device/lib/_putchar.c delete mode 100644 device/lib/inituart.c diff --git a/ChangeLog b/ChangeLog index 0110c291..9701a4e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2006-10-24 Jesus Calvino-Fraga +2006-10-27 Jesus Calvino-Fraga + + * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c: + Removed. + +2006-10-26 Jesus Calvino-Fraga * device/lib/_putchar.c, device/lib/_getchar.c, device/lib/inituart.c: Initialize uart only if SM0 and SM1 are zero. Also, use flag to turn diff --git a/device/lib/Makefile.in b/device/lib/Makefile.in index 74a9e490..a41c7d17 100644 --- a/device/lib/Makefile.in +++ b/device/lib/Makefile.in @@ -69,7 +69,7 @@ OPT_DISABLE_Z80 = @OPT_DISABLE_Z80@ SOURCES = _autobaud.c _bp.c _decdptr.c \ _gptrget.c _gptrgetc.c _gptrput.c \ _ser.c _setjmp.c \ - serial.c inituart.c _putchar.c _getchar.c ser_ir.c \ + serial.c ser_ir.c \ _atof.c _atoi.c _atol.c _itoa.c _ltoa.c \ _schar2fs.c _sint2fs.c _slong2fs.c \ _uchar2fs.c _uint2fs.c _ulong2fs.c \ diff --git a/device/lib/_getchar.c b/device/lib/_getchar.c deleted file mode 100644 index 1f5f7a34..00000000 --- a/device/lib/_getchar.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Default getchar() using the serial port - - Written By - Jesus Calvino-Fraga (October/2006) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifdef SDCC_mcs51 -#include <8051.h> - -void inituart(unsigned char t1_reload); - -char getchar (void) -{ - char c; - - if((!SM0)&&(!SM1)) inituart(0xff); - - while (!RI); - RI=0; - c=SBUF; - return c; -} -#endif diff --git a/device/lib/_putchar.c b/device/lib/_putchar.c deleted file mode 100644 index 1ad8e25a..00000000 --- a/device/lib/_putchar.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Default polling putchar() using to the serial port - - Written By - Jesus Calvino-Fraga (October/2006) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifdef SDCC_mcs51 -#include <8051.h> - -bit putchar_crlf=1; -void inituart(unsigned char t1_reload); - -void putchar (char c) -{ - if((!SM0)&&(!SM1)) inituart(0xff); - if ((c=='\n') && putchar_crlf) - { - while (!TI); - TI=0; - SBUF='\r'; - } - while (!TI); - TI=0; - SBUF=c; -} - -#endif diff --git a/device/lib/inituart.c b/device/lib/inituart.c deleted file mode 100644 index d9d6448d..00000000 --- a/device/lib/inituart.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Uart initialization for putchar() and getchar() - - Written By - Jesus Calvino-Fraga (October/2006) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifdef SDCC_mcs51 -#include <8051.h> - -void inituart (unsigned char t1_reload) -{ - TR1=0; - TMOD=(TMOD&0x0f)|0x20; - PCON|=0x80; - TH1=TL1=t1_reload; - TR1=1; - SCON=0x52; -} - -#endif diff --git a/device/lib/libsdcc.lib b/device/lib/libsdcc.lib index 68e52a10..eaad6ac5 100644 --- a/device/lib/libsdcc.lib +++ b/device/lib/libsdcc.lib @@ -44,9 +44,6 @@ malloc realloc free serial -inituart -_putchar -_getchar _autobaud _startup _ser -- 2.30.2