7 #define Serial0GetChar getchar
8 #define Serial0PutChar putchar
10 void Serial0Init (unsigned long baud, unsigned char buffered);
11 char Serial0GetChar(void);
12 void Serial0PutChar(char);
13 char Serial0CharArrived(void);
14 void Serial0Baud(unsigned long baud);
15 void Serial0SendBreak(void);
16 void Serial0Flush(void);
18 void Serial1Init (unsigned long baud, unsigned char buffered);
19 char Serial1GetChar(void);
20 void Serial1PutChar(char);
21 char Serial1CharArrived(void);
22 void Serial1Baud(unsigned long baud);
23 void Serial1SendBreak(void);
24 void Serial1Flush(void);
26 unsigned long ClockTicks();
27 void ClockMilliSecondsDelay(unsigned long ms);
28 void ClockMicroSecondsDelay(unsigned int us);
30 #define SERIAL_0_BAUD 115200L
31 #define SERIAL_1_BAUD 9600L
33 // these need to be binary numbers
34 #define SERIAL_0_RECEIVE_BUFFER_SIZE 1024
35 #define SERIAL_1_RECEIVE_BUFFER_SIZE 64
37 // I know someone is fooling with the crystals
38 #define OSCILLATOR 18432000L
40 /* Set the cpu speed in clocks per machine cycle, valid values are:
41 1024: Divide-by-1024 (power management) mode (screws ALL timers and serial)
42 4: Standard 8051 divide-by-4 mode
43 2: Use 2x xtal multiplier
44 1: Use 4x xtal multiplier (Don't do this with a TINI at 18.432MHz)
47 void CpuSpeed(unsigned int speed);
49 // The MOVX stretch cycles, see datasheet
50 #define CPU_MOVX_STRETCH 0x01
52 // internal functions used by tinibios.c
53 unsigned char _sdcc_external_startup(void);
54 void Serial0IrqHandler (void) interrupt 4;
55 void Serial1IrqHandler (void) interrupt 7;
57 void ClockIrqHandler (void) interrupt 1;