Browse Source

Pulldown for all FastIO headers

Co-Authored-By: borsegbr <borsegbr@users.noreply.github.com>
Scott Lahteine 4 years ago
parent
commit
96ab16a9dd

+ 2
- 2
Marlin/src/HAL/AVR/fastio.h View File

@@ -98,9 +98,9 @@
98 98
 
99 99
 #define SET_INPUT(IO)         _SET_INPUT(IO)
100 100
 #define SET_INPUT_PULLUP(IO)  do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
101
+#define SET_INPUT_PULLDOWN    SET_INPUT
101 102
 #define SET_OUTPUT(IO)        _SET_OUTPUT(IO)
102
-
103
-#define SET_PWM(IO)           SET_OUTPUT(IO)
103
+#define SET_PWM               SET_OUTPUT
104 104
 
105 105
 #define IS_INPUT(IO)          _IS_INPUT(IO)
106 106
 #define IS_OUTPUT(IO)         _IS_OUTPUT(IO)

+ 1
- 1
Marlin/src/HAL/DUE/fastio.h View File

@@ -166,7 +166,7 @@
166 166
 // Set pin as output (wrapper) -  reads the pin and sets the output to that value
167 167
 #define SET_OUTPUT(IO)       _SET_OUTPUT(IO)
168 168
 // Set pin as PWM
169
-#define SET_PWM(IO)           SET_OUTPUT(IO)
169
+#define SET_PWM               SET_OUTPUT
170 170
 
171 171
 // Check if pin is an input
172 172
 #define IS_INPUT(IO)         ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) == 0)

+ 1
- 1
Marlin/src/HAL/ESP32/fastio.h View File

@@ -56,7 +56,7 @@
56 56
 #define SET_OUTPUT(IO)          do{ _SET_OUTPUT(IO); }while(0)
57 57
 
58 58
 // Set pin as PWM
59
-#define SET_PWM(IO)             SET_OUTPUT(IO)
59
+#define SET_PWM                 SET_OUTPUT
60 60
 
61 61
 // Set pin as output and init
62 62
 #define OUT_WRITE(IO,V)         do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)

+ 1
- 1
Marlin/src/HAL/LPC1768/fastio.h View File

@@ -104,7 +104,7 @@
104 104
 /// set pin as output wrapper  -  reads the pin and sets the output to that value
105 105
 #define SET_OUTPUT(IO)        do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0)
106 106
 // set pin as PWM
107
-#define SET_PWM(IO)           SET_OUTPUT(IO)
107
+#define SET_PWM               SET_OUTPUT
108 108
 
109 109
 /// check if pin is an input wrapper
110 110
 #define IS_INPUT(IO)          _IS_INPUT(IO)

+ 2
- 2
Marlin/src/HAL/SAMD51/fastio.h View File

@@ -100,9 +100,9 @@
100 100
                                   PORT->Group[port].DIRCLR.reg = MASK(pin);                           \
101 101
                                 }while(0)
102 102
 // Set pin as PWM (push pull)
103
-#define SET_PWM(IO)             SET_OUTPUT(IO)
103
+#define SET_PWM                 SET_OUTPUT
104 104
 // Set pin as PWM (open drain)
105
-#define SET_PWM_OD(IO)          SET_OUTPUT_OD(IO)
105
+#define SET_PWM_OD              SET_OUTPUT_OD
106 106
 
107 107
 // check if pin is an output
108 108
 #define IS_OUTPUT(IO)            ((PORT->Group[(EPortType)GET_SAMD_PORT(IO)].DIR.reg & MASK(GET_SAMD_PIN(IO))) \

+ 2
- 1
Marlin/src/HAL/TEENSY31_32/fastio.h View File

@@ -76,8 +76,9 @@
76 76
 
77 77
 #define SET_INPUT(IO)         _SET_INPUT(IO)
78 78
 #define SET_INPUT_PULLUP(IO)  _SET_INPUT_PULLUP(IO)
79
+#define SET_INPUT_PULLDOWN    SET_INPUT
79 80
 #define SET_OUTPUT(IO)        _SET_OUTPUT(IO)
80
-#define SET_PWM(IO)            SET_OUTPUT(IO)
81
+#define SET_PWM               SET_OUTPUT
81 82
 
82 83
 #define IS_INPUT(IO)          _IS_INPUT(IO)
83 84
 #define IS_OUTPUT(IO)         _IS_OUTPUT(IO)

+ 2
- 1
Marlin/src/HAL/TEENSY35_36/fastio.h View File

@@ -76,8 +76,9 @@
76 76
 
77 77
 #define SET_INPUT(IO)         _SET_INPUT(IO)
78 78
 #define SET_INPUT_PULLUP(IO)  _SET_INPUT_PULLUP(IO)
79
+#define SET_INPUT_PULLDOWN    SET_INPUT
79 80
 #define SET_OUTPUT(IO)        _SET_OUTPUT(IO)
80
-#define SET_PWM(IO)            SET_OUTPUT(IO)
81
+#define SET_PWM               SET_OUTPUT
81 82
 
82 83
 #define IS_INPUT(IO)          _IS_INPUT(IO)
83 84
 #define IS_OUTPUT(IO)         _IS_OUTPUT(IO)

+ 11
- 10
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h View File

@@ -176,11 +176,12 @@
176 176
     #undef MAKE_ARDUINO_PINS
177 177
   } // namespace fast_io
178 178
 
179
-  #define SET_INPUT(pin)               fast_io::pin::set_input()
180
-  #define SET_INPUT_PULLUP(pin)        fast_io::pin::set_input(); fast_io::pin::set_high()
181
-  #define SET_OUTPUT(pin)              fast_io::pin::set_output()
182
-  #define READ(pin)                    fast_io::pin::read()
183
-  #define WRITE(pin, value)            fast_io::pin::write(value)
179
+  #define SET_INPUT(pin)              fast_io::pin::set_input()
180
+  #define SET_INPUT_PULLUP(pin)       do{ fast_io::pin::set_input(); fast_io::pin::set_high(); }while(0)
181
+  #define SET_INPUT_PULLDOWN          SET_INPUT
182
+  #define SET_OUTPUT(pin)             fast_io::pin::set_output()
183
+  #define READ(pin)                   fast_io::pin::read()
184
+  #define WRITE(pin, value)           fast_io::pin::write(value)
184 185
 
185 186
   #ifndef pgm_read_word_far
186 187
   #define pgm_read_word_far pgm_read_word
@@ -195,11 +196,11 @@
195 196
   #endif
196 197
 
197 198
   #define SERIAL_ECHO_START()
198
-  #define SERIAL_ECHOLNPGM(str)        Serial.println(F(str))
199
-  #define SERIAL_ECHOPGM(str)          Serial.print(F(str))
200
-  #define SERIAL_ECHO_MSG(str)         Serial.println(str)
201
-  #define SERIAL_ECHOLNPAIR(str, val) {Serial.print(F(str)); Serial.println(val);}
202
-  #define SERIAL_ECHOPAIR(str, val)   {Serial.print(F(str)); Serial.print(val);}
199
+  #define SERIAL_ECHOLNPGM(str)       Serial.println(F(str))
200
+  #define SERIAL_ECHOPGM(str)         Serial.print(F(str))
201
+  #define SERIAL_ECHO_MSG(str)        Serial.println(str)
202
+  #define SERIAL_ECHOLNPAIR(str, val) do{ Serial.print(F(str)); Serial.println(val); }while(0)
203
+  #define SERIAL_ECHOPAIR(str, val)   do{ Serial.print(F(str)); Serial.print(val); }while(0)
203 204
 
204 205
   #define safe_delay delay
205 206
 

Loading…
Cancel
Save