soft starter code for avr
But the motor has to change from full speed in one to another direction or form zero to full speed, that's why we use motors. 
You can limit the current and consequently the acceleration.  the H bridge shall output such voltage that the current remains always in the margins. The best you can do is a PI regulator, the setpoint is rated motor current and the feedback is measured current. When you will start, the regulator will output a certain duty cycle setpoint and it will be increased by regulator output when the motor will gain speed (back EMF compensation).
$$M=J\alpha + M_{load}$$ $$M \propto I_a$$ $$U_a=I_a*R_{winding}+U_{backEMF}$$ $$U_{backEMF}=k[V/krpm]*n[rpm]$$