SetMFP() should return false if pin is being used for square wave or alarm output. The statement to test the control register (line 538) is incorrect and never gives a true result (to cause function to return false) because of operator precedence ('&' is below equals/not equals test). It should be if ((registerValue & 0x70) != 0)
SetMFP() should return false if pin is being used for square wave or alarm output. The statement to test the control register (line 538) is incorrect and never gives a true result (to cause function to return false) because of operator precedence ('&' is below equals/not equals test). It should be if ((registerValue & 0x70) != 0)