mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-03 04:10:54 +00:00
Merge pull request #7722 from tcm0116/2.0.x-warnings
Cleanup 2.0.x compiler warnings
This commit is contained in:
commit
ac41eb5871
22 changed files with 238 additions and 224 deletions
Marlin/src/module
|
@ -135,9 +135,9 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
|
|||
* This fix isn't perfect and may lose steps - but better than locking up completely
|
||||
* in future the planner should slow down if advance stepping rate would be too high
|
||||
*/
|
||||
FORCE_INLINE uint16_t adv_rate(const int steps, const uint16_t timer, const uint8_t loops) {
|
||||
FORCE_INLINE HAL_TIMER_TYPE adv_rate(const int steps, const HAL_TIMER_TYPE timer, const uint8_t loops) {
|
||||
if (steps) {
|
||||
const uint16_t rate = (timer * loops) / abs(steps);
|
||||
const HAL_TIMER_TYPE rate = (timer * loops) / abs(steps);
|
||||
//return constrain(rate, 1, ADV_NEVER - 1)
|
||||
return rate ? rate : 1;
|
||||
}
|
||||
|
@ -815,8 +815,8 @@ void Stepper::isr() {
|
|||
#if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
|
||||
#ifdef CPU_32_BIT
|
||||
// Make sure stepper interrupt does not monopolise CPU by adjusting count to give about 8 us room
|
||||
uint32_t stepper_timer_count = HAL_timer_get_count(STEP_TIMER_NUM),
|
||||
stepper_timer_current_count = HAL_timer_get_current_count(STEP_TIMER_NUM) + 8 * HAL_TICKS_PER_US;
|
||||
HAL_TIMER_TYPE stepper_timer_count = HAL_timer_get_count(STEP_TIMER_NUM),
|
||||
stepper_timer_current_count = HAL_timer_get_current_count(STEP_TIMER_NUM) + 8 * HAL_TICKS_PER_US;
|
||||
HAL_timer_set_count(STEP_TIMER_NUM, max(stepper_timer_count, stepper_timer_current_count));
|
||||
#else
|
||||
NOLESS(OCR1A, TCNT1 + 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue