/* sGetChanRI used to be a macro in rocket_int.h. When the functionality for the UPCI boards was added, it was decided to make this a function because the macro was getting too complicated. All cases except the first one (UPCIRingInd) are taken directly from the original macro.  */
static int sGetChanRI(CHANNEL_T *ChP)
/* sGetChanRI used to be a macro in rocket_int.h. When the functionality for the UPCI boards was added, it was decided to make this a function because the macro was getting too complicated. All cases except the first one (UPCIRingInd) are taken directly from the original macro.  */
static int sGetChanRI(CHANNEL_T *ChP)
{
	CONTROLLER_t *CtlP = ChP->CtlP;
	int ChanNum = ChP->ChanNum;
	int RingInd = 0;
	if (CtlP->UPCIRingInd)
		RingInd = !(sInB(CtlP->UPCIRingInd) & sBitMapSetTbl[ChanNum]);
	else if (CtlP->AltChanRingIndicator)
		RingInd = sInB((ByteIO_t) (ChP->ChanStat + 8)) & DSR_ACT;
	else if (CtlP->boardType == ROCKET_TYPE_PC104)
		RingInd = !(sInB(CtlP->AiopIO[3]) & sBitMapSetTbl[ChanNum]);
	return RingInd;
}