Skip to content

Commit

Permalink
🚑️ FAST_PWM_FAN default 1KHz base freq. (#23326)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
descipher and thinkyhead authored Dec 21, 2021
1 parent b06f871 commit f374fa0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2668,10 +2668,14 @@
#endif

/**
* FAST PWM FAN Settings
* FAST PWM FAN default PWM frequency
*/
#if ENABLED(FAST_PWM_FAN) && !defined(FAST_PWM_FAN_FREQUENCY)
#define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default
#if !defined(FAST_PWM_FAN_FREQUENCY) && ENABLED(FAST_PWM_FAN)
#ifdef __AVR__
#define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1))
#else
#define FAST_PWM_FAN_FREQUENCY 1000U
#endif
#endif

/**
Expand Down

0 comments on commit f374fa0

Please sign in to comment.