toggle

Reverses the current output value of the specific pin.

DigitalOut.swift:259
func toggle()

It is really convenient if you don’t care about the current output state. The output switches between high and low automatically.