int CheckPin(int pinNum, int rowOffset)
{ //Generic pin-checking. Assumes debounced pin inputs.
	// Returns true if pin is grounded.

	//dbInteg+pinNum; want pointer, not value in array!
	int currentState = IsGround(dio[rowOffset], pinNum, dbInteg+pinNum);
	int previousState = (pinRecord>>pinNum) & 1;
	if (currentState) {
		pinRecord |= (1<<pinNum);
		if (currentState != previousState)
			return 1; //pin is pressed and wasn't previously.
	} else
		pinRecord &= !(1<<pinNum);
	return 0; //default return.
}
Exemple #2
0
bool  CConSent :: IsParag  () const
{
	return IsGround() && m_GraFile->HasDescr(m_HardGraphStartNo,OPar);
};
Exemple #3
0
bool  CConSent :: IsBullet () const
{
	return IsGround() && m_GraFile->HasDescr(m_HardGraphStartNo,OBullet);
};