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;
/* send the RES (reset) code
*/
NewState
= CI_EI;
/* and wait for a change to the EI */
/* state,
/* then send DIU
*/
*/
ReleaseCommand = CI_DIU;
break;
case PT_MM_NT:
ForceCommand = CI_DR;
/* send the deactivation request
/* code
/* and wait for DIU
*/
*/
*/
NewState
= CI_DIU;
ReleaseCommand = CI_DID;
/* then send DID to deactivate the */
/* SBC
*/
break;
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
*/
/* if testloop mode was programmed */
/* switch it off to enable L1
/* status recognition
*/
*/
r_spcr = inp (pt->pt_r_spcr);
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
315