CD2231 Intel Corporation, CD2231 Datasheet - Page 87

no-image

CD2231

Manufacturer Part Number
CD2231
Description
CD2231 Intelligent Two-channel Lan And Wan Communications Controller
Manufacturer
Intel Corporation
Datasheet
7.5
Datasheet
}
outportb( REOIR, ZERO );
Transmit Interrupt Service Routine
This example code is a transmit interrupt service handler example. When using a synchronous
protocol, transmitters must declare an end of frame if an underrun occurs. If the end of buffer is
encountered before data is transferred by this interrupt service, then the Notrans bit (TEIOR[3])
should be set along with EOF (TEIOR[6]). TEOIR is always the last access of an interrupt service
routine.
Intelligent Two-Channel LAN and WAN Communications Controller — CD2231
}
int teoir = ZERO;
int tisr = inportb( TISR );// status
int ch = inportb( TIR ) & 0x01;// channel number
switch( tisr ) {
case TISR_UE:
case TISR_TXDATA:
}
outportb( TEOIR, teoir );
} else {
}
teoir = TEOIR_EOF;// underflow
break;
tftc = inportb( TFTC ); // FIFO count
for( i=0; i<tftc; i++) {
}
outport( BRBADRL, ib[ch].lower() );
outport( BRBCNT, BUF_MAX );
outport( BRBSTS, OWN_2231 );
ib[ch].nxt_buf();// get next buffer
outport( ARBADRU, ib[ch].upper() );
outport( ARBADRL, ib[ch].lower() );
outport( ARBCNT, BUF_MAX );
outport( ARBSTS, OWN_2231 );
ib[ch].nxt_buf();// get next buffer
if( ob[ch].is_eob() ) {// end of buffer ?
}
else outportb( TDR, ob[ch].nxt_char() );//send next character
ob[ch].nxt_buf();// get next buffer
teoir = TEOIR_EOF;
if( i==0 )
break;
// buffer A next
// default
teoir |= NOTRANS;
87

Related parts for CD2231