mirror of
https://github.com/synthetos/g2.git
synced 2026-09-25 08:03:37 +08:00
Finishing transition to all-hardware timers for fwd-plan/exec, and direct call of load
This commit is contained in:
@@ -76,7 +76,6 @@ extern OutputPin<kDebug3_PinNumber> debug_pin3;
|
||||
//extern OutputPin<kDebug4_PinNumber> debug_pin4;
|
||||
|
||||
dda_timer_type dda_timer {kTimerUpToMatch, FREQUENCY_DDA}; // stepper pulse generation
|
||||
//load_timer_type load_timer; // triggers load of next stepper segment
|
||||
exec_timer_type exec_timer; // triggers calculation of next+1 stepper segment
|
||||
fwd_plan_timer_type fwd_plan_timer; // triggers planning of next block
|
||||
|
||||
@@ -125,9 +124,6 @@ void stepper_init()
|
||||
// If you need more pulse width you need to drop the DDA clock rate
|
||||
dda_timer.setInterrupts(kInterruptOnOverflow | kInterruptPriorityHighest);
|
||||
|
||||
// setup software interrupt load timer
|
||||
// load_timer.setInterrupts(kInterruptOnSoftwareTrigger | kInterruptPriorityHigh);
|
||||
|
||||
// setup software interrupt exec timer & initial condition
|
||||
exec_timer.setInterrupts(kInterruptOnSoftwareTrigger | kInterruptPriorityMedium);
|
||||
st_pre.buffer_state = PREP_BUFFER_OWNED_BY_EXEC;
|
||||
@@ -417,22 +413,10 @@ void st_request_load_move()
|
||||
stepper_debug("l");
|
||||
if (st_pre.buffer_state == PREP_BUFFER_OWNED_BY_LOADER) { // bother interrupting
|
||||
stepper_debug("_");
|
||||
// load_timer.setInterruptPending();
|
||||
_load_move();
|
||||
}
|
||||
}
|
||||
|
||||
//namespace Motate { // Define timer inside Motate namespace
|
||||
// template<>
|
||||
// void load_timer_type::interrupt()
|
||||
// {
|
||||
// load_timer.getInterruptCause(); // read SR to clear interrupt condition
|
||||
// stepper_debug("L>");
|
||||
// _load_move();
|
||||
// stepper_debug("L+\n");
|
||||
// }
|
||||
//} // namespace Motate
|
||||
|
||||
/****************************************************************************************
|
||||
* _load_move() - Dequeue move and load into stepper runtime structure
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user