-
Notifications
You must be signed in to change notification settings - Fork 0
/
defs.h
49 lines (27 loc) · 1.02 KB
/
defs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef DEFS_H
#define DEFS_H
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <avr/interrupt.h>
#include "SerialCommand.h"
#include "fastio.h"
#include "conf.h"
#include "pins.h"
#include "Arduino.h"
#include "XYmotion.h"
#include "Zmotion.h"
#include "Head_selector.h"
#include "SerialRefs.h"
#define FORCE_INLINE __attribute__((always_inline)) inline
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg;
#define enable_x() {SET_OUTPUT(X_ENABLE_PIN); WRITE(X_ENABLE_PIN, X_ENABLE_ON);}
#define disable_x() {SET_OUTPUT(X_ENABLE_PIN); WRITE(X_ENABLE_PIN, !X_ENABLE_ON);}
#define enable_y() {SET_OUTPUT(Y_ENABLE_PIN); WRITE(Y_ENABLE_PIN, Y_ENABLE_ON);}
#define disable_y() {SET_OUTPUT(Y_ENABLE_PIN); WRITE(Y_ENABLE_PIN, !Y_ENABLE_ON);}
#define enable_z() {SET_OUTPUT(Z_ENABLE_P); WRITE(Z_ENABLE_P, Z_ENABLE_ON);}
#define disable_z() {SET_OUTPUT(Z_ENABLE_P); WRITE(Z_ENABLE_P, !Z_ENABLE_ON);}
#endif