using a pile of transistors to make the controller to drive the fets, and should connect easily to cmos for input:
11: coast
10: forward
01: reverse
00: brake
I wonder if the fet gate drive transistors can probably be replaced by optocouplers for isolation? might look at that next