Proper AVR preemptive interrupt handling (#10501)

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
Scott Lahteine 2018-04-23 20:47:31 -05:00 committed by GitHub
parent 0764981aa1
commit 51004e003d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 38 deletions

View file

@ -43,6 +43,10 @@
#define SOFT_PWM_SCALE 0
#endif
#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B)
#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
#if HOTENDS == 1
@ -119,8 +123,6 @@ class Temperature {
public:
static volatile bool in_temp_isr;
static float current_temperature[HOTENDS];
static int16_t current_temperature_raw[HOTENDS],
target_temperature[HOTENDS];