http://playground.arduino.cc//Code/DigitalToggle -- DigitalToggle is a library for the Arduino. It provides the functions digitalToggle() and digitalToggleFast() which toggle the state of the specified digital pin by looking up the appropriate AVR PIN register for the digital pin and then writing the appropriate bit in that register, causing the corresponding PORT bit to be toggled. This is useful when it is desirable to change the state of a pin, regardless of the current state.
Share this library with your friends on your favorite profile: