Zilog EZ80F916 User Manual
Page 161

UM014423-0607
Using the ANSI C-Compiler
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
141
void isr_timer1(void)
{
unsigned char temp;
unsigned int delay;
temp = TMR_CTL1;//read to clear pending int
temp = TMR_IIR1;
intermediate_ticks1++;
if(intermediate_ticks1 >= 10)
{
intermediate_ticks1 = 0;
ticks1++;
}
}
/****************************************************************
* All this ISR should do is put the data into our internal fifos
*
*/
#pragma interrupt
void isr_uart1(void)
{
short temp;
temp = UART_LSR1;
if ( temp & 0x04 )
{
mdb_buff[byte_pos] = UART_RBR1;
byte_pos++;
done = 1;
}
if ( temp & 0x01)
{
mdb_buff[byte_pos] = UART_RBR1;
byte_pos++;
}
while( UART_LSR1 & 0x20) {//THRE int
if( ! fifo_empty(uart1tx->fifo) ) {// and we still have
stuff to send ...
UART_THR1=fifo_get(uart1tx->fifo);// send it.
} else {
// otherwise ...
UART_IER1&=0xfd;// disable tx interrupts
break;