LED toggles based on interrupt flag

Changed the main loop to toggle LED based on the interrupt flag being
raised due to the general purpose timer.

Functionality:
General purpose timer counts from 0 to the value stored in its load
register. When the timer reaches this value, it raises the associated
interrupt flag and resets the timer value to 0. Every time the interrupt
flag is raised, the LED changes its on/off status. The flag is then
reset and the timer runs again until it hits the load value and sets the
interrupt flag, repeating the process.