How many control pins needed for L298N H-Bridge?
With two pins you have full control. This allows both forward, reverse and stop. if you want to allow coasting, you will need three pins to bring Ven low. If you do not need fast stop, you could use an XOR to control the Ven from the 2 control lines. When they are equal drive t low. Then it has forward reverse and coast.

If you hold Ven High when you decide to stop moving it will full brake. If you use a simple XOR gate to do the Ven signal then you can only coast. It is decided based on what you want the motor to do. If you need the option, use three lines. from a micro this is almost no cost.