Skip to content
Snippets Groups Projects
Commit 6a040a69 authored by Stefan Brüns's avatar Stefan Brüns Committed by Scott Lahteine
Browse files

SOFT_PWM: Do not switch off heaters twice on pwm_count wraparound


After wraparound, pwm_count <= pwm_mask holds, thus soft_pwm_X <= pwm_count
guarantees soft_pwm_X < pwm_mask is true, and the heater will be switched
off in the first branch.
Do not evaluate the pwm conditions a second time, this reduces the
instruction count (4 instructions per PWM) and text size (6 byte).

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
parent 0a74774a
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment