* src/cdbFile.c(spacesToUnderscores): new function,
(cdbWriteEndFunction, cdbWriteCLine): use spacesToUnderscores, fixes bug
1068030
+ * device/include/tinibios.h: removed defines for putchar and getchar
+ * device/lib/ds390/Makefile.in: added putchar.c
+ * device/lib/ds390/putchar.c: new, added, fixes bug 1465671
2006-12-09 Borut Razem <borut.razem AT siol.net>
#include <ds80c390.h>
#include <time.h>
-#define Serial0GetChar getchar
-#define Serial0PutChar putchar
-
void Serial0Init (unsigned long baud, unsigned char buffered);
char Serial0GetChar(void);
void Serial0PutChar(char);
/* Set the cpu speed in clocks per machine cycle, valid values are:
1024: Divide-by-1024 (power management) mode (screws ALL timers and serial)
4: Standard 8051 divide-by-4 mode
- 2: Use 2x xtal multiplier
+ 2: Use 2x xtal multiplier
1: Use 4x xtal multiplier (Don't do this with a TINI at 18.432MHz)
*/
#define CPU_SPEED 2
extern char I2CReset(void);
extern char I2CStart(void);
extern char I2CStop(void);
-extern char I2CSendStop(char addr, char count,
+extern char I2CSendStop(char addr, char count,
char send_stop);
extern char I2CReceive(char addr, char count);
-extern char I2CSendReceive(char addr, char tx_count,
+extern char I2CSendReceive(char addr, char tx_count,
char rx_count);
//extern char I2CByteOut(char);
//extern void I2CDumpError(char);
// functions for dealing with the ds400 ROM firmware.
// A wrapper which calls rom_init allocating all available RAM in CE0
-// to the heap, sets the serial port to SERIAL_0_BAUD, sets up the
+// to the heap, sets the serial port to SERIAL_0_BAUD, sets up the
// millisecond timer, and diddles the clock multiplier.
// Values for the romInit "speed" parameter.
#VERBOSE = --verbose
-OBJECTS = tinibios.rel memcpyx.rel lcd390.rel i2c390.rel rtc390.rel
+OBJECTS = tinibios.rel memcpyx.rel lcd390.rel i2c390.rel rtc390.rel putchar.rel
SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
all: $(OBJECTS) libds390.lib
clean:
- rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
+ rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
rm -f *.ihx temp.lnk *.map *.lib
distclean: clean
--- /dev/null
+/*-------------------------------------------------------------------------\r
+ putchar.c - putchar implementation for DS80C390\r
+\r
+ Written By - Maarten Brock, sourceforge.brock@dse.nl\r
+\r
+ This program is free software; you can redistribute it and/or modify it\r
+ under the terms of the GNU General Public License as published by the\r
+ Free Software Foundation; either version 2, or (at your option) any\r
+ later version.\r
+\r
+ This program is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with this program; if not, write to the Free Software\r
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+\r
+ In other words, you are welcome to use, share and improve this program.\r
+ You are forbidden to forbid anyone else to use, share and improve\r
+ what you give them. Help stamp out software-hoarding!\r
+-------------------------------------------------------------------------*/\r
+\r
+#include <tinibios.h>\r
+#include <stdio.h>\r
+\r
+void putchar (char c)\r
+{\r
+ Serial0PutChar(c);\r
+}\r
+\r
+extern char getchar(void)\r
+{\r
+ return Serial0GetChar();\r
+}\r