|
@@ -26,7 +26,10 @@
|
26
|
26
|
|
27
|
27
|
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
28
|
28
|
|
|
29
|
+#define AVR_ATmega2560_FAMILY_PLUS_70 MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H)
|
|
30
|
+
|
29
|
31
|
#if AVR_AT90USB1286_FAMILY
|
|
32
|
+
|
30
|
33
|
// Working with Teensyduino extension so need to re-define some things
|
31
|
34
|
#include "pinsDebug_Teensyduino.h"
|
32
|
35
|
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
|
@@ -35,7 +38,9 @@
|
35
|
38
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
36
|
39
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
|
37
|
40
|
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
|
41
|
+
|
38
|
42
|
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
|
43
|
+
|
39
|
44
|
#include "pinsDebug_plus_70.h"
|
40
|
45
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
41
|
46
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
|
@@ -43,11 +48,13 @@
|
43
|
48
|
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
44
|
49
|
|
45
|
50
|
#else
|
|
51
|
+
|
46
|
52
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
47
|
53
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
48
|
54
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
49
|
55
|
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
50
|
56
|
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
|
57
|
+
|
51
|
58
|
#endif
|
52
|
59
|
|
53
|
60
|
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|