do{
if (Button(&Switch_Port, Switch_Pin, Debounce_Time, 0)) { // calls a library function that debounces the button press
if (!Switch) { // if Switch is equal to 0.
LED = ~LED; // bitwise negation. If the Switch is equal to 0 and the LED is off it becomes on, on becomes off.
}
while (!Switch); //an empty while loop. execution is stuck here till Switch is not equal to 0.
}
} while(1); // Infinite Loop } // 1 is always 1 so we're stuck in a continuous do..while loop.