X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Finclude%2Ftinibios.h;h=4ab9b8751e5c05f6702c5490bb23d9266cf7b10c;hb=10c9f9db0ff831a36b97b4b648c3fe64a20add7e;hp=c27837b63eed3c446571321bd9e694be1e99f509;hpb=856b88b89030bb496aaf9e21e39d98e5b48b9869;p=fw%2Fsdcc diff --git a/device/include/tinibios.h b/device/include/tinibios.h old mode 100755 new mode 100644 index c27837b6..4ab9b875 --- a/device/include/tinibios.h +++ b/device/include/tinibios.h @@ -5,9 +5,6 @@ #include #include -#define Serial0GetChar getchar -#define Serial0PutChar putchar - void Serial0Init (unsigned long baud, unsigned char buffered); char Serial0GetChar(void); void Serial0PutChar(char); @@ -47,7 +44,7 @@ void ClockMicroSecondsDelay(unsigned int us); /* 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 @@ -71,18 +68,18 @@ 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(const char *format, ...) reentrant; -extern void LcdLPrintf(unsigned int collumnRow, const char *format, ...) reentrant; +extern void LcdPrintf(const char *format, ...) __reentrant; +extern void LcdLPrintf(unsigned int collumnRow, 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, +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); @@ -97,19 +94,19 @@ extern char i2cReceiveBuffer[I2C_BUFSIZE]; // internal functions used by tinibios.c unsigned char _sdcc_external_startup(void); -void Serial0IrqHandler (void) interrupt 4; -void Serial1IrqHandler (void) interrupt 7; +void Serial0IrqHandler (void) __interrupt 4; +void Serial1IrqHandler (void) __interrupt 7; #if !defined(SDCC_ds400) void ClockInit(); -void ClockIrqHandler (void) interrupt 1 _naked; +void ClockIrqHandler (void) __interrupt 1 __naked; #endif #if defined(SDCC_ds400) // 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.