Remove redundant definitions of CRITICAL_SECTION_*
Move CRITICAL_SECTION_START/END into fastio.h, where it's needed.
This commit is contained in:
parent
df824414ef
commit
30262b0a6e
|
|
@ -287,11 +287,6 @@ FORCE_INLINE unsigned long millis_nc() {
|
||||||
void setPwmFrequency(uint8_t pin, int val);
|
void setPwmFrequency(uint8_t pin, int val);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CRITICAL_SECTION_START
|
|
||||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
|
||||||
#define CRITICAL_SECTION_END SREG = _sreg;
|
|
||||||
#endif //CRITICAL_SECTION_START
|
|
||||||
|
|
||||||
extern bool fans_check_enabled;
|
extern bool fans_check_enabled;
|
||||||
extern float homing_feedrate[];
|
extern float homing_feedrate[];
|
||||||
extern uint8_t axis_relative_modes;
|
extern uint8_t axis_relative_modes;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,13 @@
|
||||||
#define MASK(PIN) (1 << PIN)
|
#define MASK(PIN) (1 << PIN)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CRITICAL_SECTION_START
|
||||||
|
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
||||||
|
#define CRITICAL_SECTION_END SREG = _sreg;
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif //CRITICAL_SECTION_START
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
magic I/O routines
|
magic I/O routines
|
||||||
now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
|
now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,7 @@
|
||||||
|
|
||||||
#ifdef SYSTEM_TIMER_2
|
#ifdef SYSTEM_TIMER_2
|
||||||
|
|
||||||
#include <avr/io.h>
|
|
||||||
#include <avr/interrupt.h>
|
|
||||||
#include "pins.h"
|
#include "pins.h"
|
||||||
|
|
||||||
#ifndef CRITICAL_SECTION_START
|
|
||||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
|
||||||
#define CRITICAL_SECTION_END SREG = _sreg;
|
|
||||||
#endif //CRITICAL_SECTION_START
|
|
||||||
|
|
||||||
|
|
||||||
#include "fastio.h"
|
#include "fastio.h"
|
||||||
|
|
||||||
void timer4_init(void)
|
void timer4_init(void)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue