English
Language : 

PSB2186 Datasheet, PDF (235/240 Pages) Siemens Semiconductor Group – ISDN Subscriber Access Controller for Terminals
Low Level Controller
/*
*/
/***************************************************************************/
EXPORT int
ResL1_SBC (pt)
register PEITAB *pt;
{
int
i, state, failed = FALSE;
BYTE
ForceCommand, NewState, ReleaseCommand, Loop, r_spcr;
switch (pt->pt_ModulMode)
{
case PT_MM_TE:
ForceCommand = CI_RS;
NewState
= CI_EI;
ReleaseCommand = CI_DIU;
break;
/* send the RES (reset) code
*/
/* and wait for a change to the EI */
/* state,
*/
/* then send DIU
*/
case PT_MM_NT:
ForceCommand = CI_DR;
NewState
= CI_DIU;
ReleaseCommand = CI_DID;
break;
/* send the deactivation request */
/* code
*/
/* and wait for DIU
*/
/* then send DID to deactivate the */
/* SBC
*/
default:
if (pt->pt_Lay1id == SBC_LAY1)
pt->pt_Lay1id = UNK_LAY1;
return (FALSE);
}
if (pt->pt_state & PT_IOM2)
{
ReleaseCommand |= 0x03;
ForceCommand |= 0x03;
}
state = ENTERNOINT ();
/* disable all system interrupts */
r_spcr = inp (pt->pt_r_spcr);
/* if testloop mode was programmed */
/* switch it off to enable L1
*/
/* status recognition
*/
if (Loop = (r_spcr & SPCR_TPL))
outp (pt->pt_r_spcr, (r_spcr & ~SPCR_TPL));
outp (pt->pt_r_mask, ~ISTA_CIC); /* allow only C/I interrupts
*/
if (pt->pt_ModulMode == PT_MM_TE)
EnaClk_SBC (pt);
/* output the command code
*/
outp (pt->pt_r_cixr, (BYTE) (CIXR_TBC | ForceCommand));
Semiconductor Group
235