Made the interrupt callback generic.