CD2401 Intel, CD2401 Datasheet - Page 91

no-image

CD2401

Manufacturer Part Number
CD2401
Description
Multi-protocol Communications Controller
Manufacturer
Intel
Datasheet
7.5
Datasheet
switch( inport(LIVR) & 0x03 ) {
case LIVR_GOODDATA:
case LIVR_EXCEPTION:
{
}
outportb( REOIR, ZERO );
Transmit Interrupt Service Routine
The following code example 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, and no data is transferred by this interrupt service, then the Notrans bit
(TEOIR[3]) should be set along with EOF (TEOIR[6]). TEOIR is always the last access of an
interrupt service routine.
transferred
break;
if( risrl & RISR_EOF ) {
// buffer B next
}
int teoir = ZERO;
int tisr = inportb( TISR );
int ch = inportb( TIR ) & 0x03;
switch( tisr ) {
case TISR_UE:
case TISR_TXDATA:
}
outportb( TEOIR, teoir );
} else {
}
}
teoir = TEOIR_EOF;
break;
tftc = inportb( TFTC );
for( i = 0; i < tftc; i++) {
}
else outportb( TDR, ob[ch].nxt_char() );//send next character
outport( BRBADRU, ib[ch].upper() );
outport( BRBADRL, ib[ch].lower() );
outport( BRBCNT, BUF_MAX );
outport( BRBSTS, 2401_OWN );
ib[ch].nxt_buf();
outport( ARBADRU, ib[ch].upper() );
outport( ARBADRL, ib[ch].lower() );
outport( ARBCNT, BUF_MAX );
outport( ARBSTS, 2401_OWN );
ib[ch].nxt_buf();
if( ob[ch].is_eob() ) {
ob[ch].nxt_buf();
teoir = TEOIR_EOF;
if( i == 0 )
break;
Multi-Protocol Communications Controller — CD2401
// shouldn’t happen in DMA
// EOF is ’normal’ exception
if( inportb(DMABSTS) & DMABS_NRBUF )
// get next buffer
// buffer A next
// get next buffer
// default
// status
// channel number
// underflow
// FIFO count
// end of buffer?
// get next buffer
teoir |= NOTRANS;// no data
91

Related parts for CD2401