H-bridge
Four switches around a motor that let firmware drive it in either direction.
An H-bridge connects each motor terminal to either supply rail through a pair of switches. Turning on opposite corners drives the motor one way or the other; both low-side switches on brakes it.