merged wiring.c