def _freeRelay(port): hal.setRelayForward(port, False) hal.setRelayReverse(port, False) hal.freeDIO(port)
def _freeDigitalSource(port): hal.freeDIO(port) hal.freeDigitalPort(port)
def _freePWM(port): hal.setPWM(port, 0) hal.freePWMChannel(port) hal.freeDIO(port)