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
3 changed files with 7 additions and 14 deletions
|
@ -287,11 +287,6 @@ FORCE_INLINE unsigned long millis_nc() {
|
|||
void setPwmFrequency(uint8_t pin, int val);
|
||||
#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 float homing_feedrate[];
|
||||
extern uint8_t axis_relative_modes;
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
#define MASK(PIN) (1 << PIN)
|
||||
#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
|
||||
now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
|
||||
|
|
|
@ -7,16 +7,7 @@
|
|||
|
||||
#ifdef SYSTEM_TIMER_2
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.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"
|
||||
|
||||
void timer4_init(void)
|
||||
|
|
Loading…
Add table
Reference in a new issue