Refactor for using one DIR out on INV

Using INV as direction control. IN1 and IN2 are connected to GND and
5V.