Low Level Controller
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
’pei’
0x00 D-channel controller
0x40 B-channel controller (A)
0x80 B-channel controller (B)
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
’modulo’
’mode’
0
1
modulo 8 operation
modulo 128 operation
operating mode. (automode, non automode, etc.)
’tim_mode’ value for the TIMR register (valid in auto mode only)
refer to the description of that register in the
data sheets.
Purpose: Initialization of an ICCs (ISAC-..) HDLC controller part. */
After execution of InitLay2_ICC, the TEI values for
the Broadcast Link are programmed.
*/
*/
*/
*/
*/
*/
Note: No HDLC controller reset is done.
Only two byte address fields are supported
If the ICC (ISAC) is reprogrammed from AUTOMODE to NON - AUTOMODE */
the successful transmission and acknowledgement of an I-frame
currently sent is not assured.
Switching from AUTOMODE to NON AUTOMODE causes an I frame to be
transmitted completely by the ICC. But the transmit acknowledge
(XPR interrupt) in NON AUTOMODE only indicates that the ICC has
sent the frame out of its XFIFO. It indicates not the successful */
transmission of the I-frame as it is in AUTOMODE (timer super-
vision, polling for acknowledge frames)!
Therefore if an I-frame is outstanding and the mode is changed
from AUTOMODE to NON-AUTOMODE MISSING_ACKNOWLEDGE is called to
generate a warning message.
MISSING_ACKNOWLEDGE is also called if ’timer recovery’ status
(TREC) or ’waiting for acknowledge (WFA)’ is indicated.
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
/***************************************************************************/
EXPORT int
InitLay2_ICC (pei, modulo, mode, tim_mode)
BYTE
pei, modulo, mode, tim_mode;
{
BYTE
mode_reg;
register PEITAB
*pt;
if (!(pt = GetPeitab_BASIC (pei))) /* request pointer to the
/* corresponding PEITAB table
/* element
*/
*/
*/
return (ACK_NOT_SUPPORTED);
if (modulo != 0 && modulo != 1)
return (ACK_WRONG_PARM);
outp (pt->pt_r_mask, 0xFF);
/* no interrupts during init.
*/
*/
mode_reg = inp (pt->pt_r_mode) & (MODE_HMD2 | MODE_HMD1 | MODE_HMD0);
switch (mode)
/* select OPERATING MODE
Semiconductor Group
288