0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-11 00:53:08 +00:00

🩹 Fix _MAX type warning (#27272)

This commit is contained in:
ellensp 2024-07-16 07:01:32 +12:00 committed by GitHub
parent 5334a8f0ed
commit 5140726c70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,7 +299,7 @@ class Stepper {
// and avoid the most unreasonably slow step rates.
static constexpr uint32_t minimal_step_rate = (
#ifdef CPU_32_BIT
_MAX((STEPPER_TIMER_RATE) / HAL_TIMER_TYPE_MAX, 1U) // 32-bit shouldn't go below 1
_MAX((uint32_t(STEPPER_TIMER_RATE) / HAL_TIMER_TYPE_MAX), 1U) // 32-bit shouldn't go below 1
#else
(F_CPU) / 500000U // AVR shouldn't go below 32 (16MHz) or 40 (20MHz)
#endif