Low Level Controller
}
else
/* as can be seen here U frames
*/
pt->pt_rx_frame = PT_FR_UI;/* with I field are always treated */
/* as UI frames regardless whether */
/* it’s an real UI frame or an
/* erroneous (= too long) U frame
*/
*/
break;
case 0x1:
/* *** HDLC S-Frame **
*/
*/
/* two byte control field ?
if ((Two = (pt->pt_state & PT_M128)))
{
ctrl <<= 8;
ctrl |= (WORD) *ptr++;
if (pt->pt_rx_cnt > 0)
pt->pt_rx_cnt--;
else
/* Second byte of the two byte
/* control field is missing !
*/
*/
frame_status = MUTILATED;
}
if (pt->pt_rx_cnt > 0)
frame_status = TOO_LONG;
/* S frame with I-field !
*/
pt->pt_rx_frame = PT_FR_S;
break;
case 0x2:
case 0x0:
/* *** HDLC I frame **
*/
*/
/* no address recognition
if (pt->pt_op_mode == PT_MD_CLEAR_EXT)
{
pt->pt_rx_frame = PT_FR_TR;
break;
}
Two = (pt->pt_state & PT_M128);
pt->pt_rx_frame = PT_FR_I;
/* C/R bit of received I frame
*/
/* valid (=1) in TE configuration ? */
/* If ’CR_of_I_valid’ is FALSE the */
/* automatic acknowledge of an
/* I frame in Automode is
/* prevented! A protocol software
*/
*/
*/
/* will receive the PROTOCOL_ERROR */
/* message and re-establish the
/* link.
*/
*/
if (AutoM && !(sapi & 0x02) && (pt->pt_ModulMode == PT_MM_TE))
CR_of_I_valid = FALSE;
if (AutoM)
break;
Semiconductor Group
304