added lcd i2c and rtc support for tinibios
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 2 Feb 2001 15:20:39 +0000 (15:20 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 2 Feb 2001 15:20:39 +0000 (15:20 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@560 4a8a32a2-be11-0410-ad9d-d568d2c75423

device/include/tinibios.h

index 8a8972b88edbe2a5b159c44c3ed9d2c87374cf06..3e9bd3ccd9638bdf67e20d60e3ff0d6c8601290c 100755 (executable)
@@ -49,6 +49,49 @@ void CpuSpeed(unsigned int speed);
 // The MOVX stretch cycles, see datasheet
 #define CPU_MOVX_STRETCH 0x01
 
+// from rtc390.c
+static struct RTCDate{
+  int year;
+  unsigned char month, day, weekDay, hour, minute, second, hundredth;
+};
+
+unsigned char RtcRead(struct RTCDate *rtcDate);
+void RtcWrite(struct RTCDate *rtcDate);
+
+// from lcd390.c
+extern void LcdInit(void);
+extern void LcdOn(void);
+extern void LcdOff(void);
+extern void LcdClear(void);
+extern void LcdHome(void);
+extern void LcdGoto(unsigned int collumnRow);
+extern void LcdPutChar(char c);
+extern void LcdPutString(char *string);
+extern void LcdLPutString(unsigned int collumnRow, char *string);
+extern void LcdPrintf(xdata const char *format, ...) reentrant;
+extern void LcdLPrintf(unsigned int collumnRow, xdata const char *format, ...) reentrant;
+
+// from i2c390.c
+#define I2C_BUFSIZE 128
+extern char I2CReset(void);
+extern char I2CStart(void);
+extern char I2CStop(void);
+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, 
+                          char rx_count);
+//extern char I2CByteOut(char);
+//extern void I2CDumpError(char);
+
+/* global transfer buffers */
+extern char i2cTransmitBuffer[I2C_BUFSIZE];
+extern char i2cReceiveBuffer[I2C_BUFSIZE];
+
+// Macro for normal send transfer ending with a stop condition
+#define I2CSend(addr, count)   I2CSendStop(addr, count, 1)
+
+
 // internal functions used by tinibios.c
 unsigned char _sdcc_external_startup(void);
 void Serial0IrqHandler (void) interrupt 4;