In stepper motor control, acceleration is proportional to the
frequency of changing (increment or decrement)
. We call this
.
You need one object of struct FreqDiv just to control
acceleration. The call-back function cb_func
should be responsible to
increment or decrement the freq property of the
struct FreqDiv for velocity control. You may also want to
maintain a parameter structure (and initialize
property cb_param) for acceleration control
(to at least indicate whether it is acceleration or deceleration).