PWM fixes, slow down fan update
include LPC1768 syntax for M42 couple more pin_t changes consistency change M42 to R, P format Revert "change M42 to R, P format" This reverts commit 01f12f579ec9ccc1bb9126e68d2c86449e9b7edf.
This commit is contained in:
committed by
Scott Lahteine
parent
60adc6ff02
commit
c14000775b
@@ -1271,57 +1271,38 @@ void Temperature::init() {
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
|
||||
void Temperature::setPwmFrequency(const uint8_t pin, int val) {
|
||||
val &= 0x07;
|
||||
switch (digitalPinToTimer(pin)) {
|
||||
#ifdef TCCR0A
|
||||
#if !AVR_AT90USB1286_FAMILY
|
||||
case TIMER0A:
|
||||
void Temperature::setPwmFrequency(const pin_t pin, int val) {
|
||||
#ifdef ARDUINO
|
||||
val &= 0x07;
|
||||
switch (digitalPinToTimer(pin)) {
|
||||
#ifdef TCCR0A
|
||||
#if !AVR_AT90USB1286_FAMILY
|
||||
case TIMER0A:
|
||||
#endif
|
||||
case TIMER0B: //_SET_CS(0, val);
|
||||
break;
|
||||
#endif
|
||||
case TIMER0B:
|
||||
//_SET_CS(0, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR1A
|
||||
case TIMER1A:
|
||||
case TIMER1B:
|
||||
//_SET_CS(1, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR2
|
||||
case TIMER2:
|
||||
case TIMER2:
|
||||
_SET_CS(2, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR2A
|
||||
case TIMER2A:
|
||||
case TIMER2B:
|
||||
_SET_CS(2, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR3A
|
||||
case TIMER3A:
|
||||
case TIMER3B:
|
||||
case TIMER3C:
|
||||
_SET_CS(3, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR4A
|
||||
case TIMER4A:
|
||||
case TIMER4B:
|
||||
case TIMER4C:
|
||||
_SET_CS(4, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR5A
|
||||
case TIMER5A:
|
||||
case TIMER5B:
|
||||
case TIMER5C:
|
||||
_SET_CS(5, val);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#ifdef TCCR1A
|
||||
case TIMER1A: case TIMER1B: //_SET_CS(1, val);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TCCR2
|
||||
case TIMER2: case TIMER2: _SET_CS(2, val); break;
|
||||
#endif
|
||||
#ifdef TCCR2A
|
||||
case TIMER2A: case TIMER2B: _SET_CS(2, val); break;
|
||||
#endif
|
||||
#ifdef TCCR3A
|
||||
case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;
|
||||
#endif
|
||||
#ifdef TCCR4A
|
||||
case TIMER4A: case TIMER4B: case TIMER4C: _SET_CS(4, val); break;
|
||||
#endif
|
||||
#ifdef TCCR5A
|
||||
case TIMER5A: case TIMER5B: case TIMER5C: _SET_CS(5, val); break;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // FAST_PWM_FAN
|
||||
@@ -1332,7 +1313,7 @@ void Temperature::init() {
|
||||
* their target temperature by a configurable margin.
|
||||
* This is called when the temperature is set. (M104, M109)
|
||||
*/
|
||||
void Temperature::start_watching_heater(uint8_t e) {
|
||||
void Temperature::start_watching_heater(const uint8_t e) {
|
||||
#if HOTENDS == 1
|
||||
UNUSED(e);
|
||||
#endif
|
||||
|
@@ -361,14 +361,14 @@ class Temperature {
|
||||
static int16_t degTargetBed() { return target_temperature_bed; }
|
||||
|
||||
#if WATCH_HOTENDS
|
||||
static void start_watching_heater(uint8_t e = 0);
|
||||
static void start_watching_heater(const uint8_t e = 0);
|
||||
#endif
|
||||
|
||||
#if WATCH_THE_BED
|
||||
static void start_watching_bed();
|
||||
#endif
|
||||
|
||||
static void setTargetHotend(const int16_t celsius, uint8_t e) {
|
||||
static void setTargetHotend(const int16_t celsius, const uint8_t e) {
|
||||
#if HOTENDS == 1
|
||||
UNUSED(e);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user