pulseOut?

The implementation is in the file wiring_digital.c.

digitalWrite gets the port and bit associated with the pin and then checks to see if the pin has a timer associated (it turns off PWM on that timer if so. digitalWrite compiles to over 60 machine language instructions.