Adding main.c implementation for hw interrupt compare