Low Level Controller
pt->pt_state &= ~PT_TX_MMU_FREE;
}
}
}
else
{
/* transmit count is not 0
/* more data to be sent !
/* ------------------------
*/
*/
*/
if (pt->pt_op_mode == PT_MD_AUTO)
cmd = (pt->pt_tx_frame ? CMDR_XTF : CMDR_XIF) |
(inp(pt->pt_r_star) & CMDR_RNR);
else
cmd = CMDR_XTF;
/* less than 32 bytes left ?
*/
if (pt->pt_tx_cnt <= 32)
{
/* shift all bytes into the XFIFO
/* and give XME command
*/
*/
STRING_OUT (pt->pt_tx_curr, pt->pt_r_fifo, cnt);
pt->pt_tx_cnt = 0;
outp (pt->pt_r_cmdr, cmd | CMDR_XME);
}
else
{
/* more than 32 bytes are left to
*/
/* be sent; write 32 into the XFIFO */
STRING_OUT (pt->pt_tx_curr, pt->pt_r_fifo, 32);
outp (pt->pt_r_cmdr, cmd); /* give the transmit command,
*/
*/
*/
pt->pt_tx_curr += 32;
pt->pt_tx_cnt -= 32;
/* update current buffer pointer
/* and counter of remaining bytes
}
}
}
if (ista & ISTA_TIN)
{
/* TIN interrupt
/* =============
/* ResetHDLC_ICC (pt->pt_pei);
*/
*/
*/
DISABLE_TREC_STATUS_CHECK ();
TIN_ERROR (pt->pt_pei);
}
/* HDLC receiver interrupt ?
/* =========================
/* (receive pool full or receive
*/
*/
*/
/* message end and not PCE and not */
/* TIN) */
if ((ista & (ISTA_RPF | ISTA_RME))
&& !(exir & EXIR_PCE) && !(ista & ISTA_TIN))
RX_ICC (ista & ISTA_RPF, pt);
/* status change of the remote
/* station’s receiver
/* (i.e. RR or RNR received).
*/
*/
*/
/* The status can be determined by */
/* reading the RRNR bit of
/* register STAR
*/
*/
Semiconductor Group
298