Moved motor functions from pwm.c to motors.c