|
@@ -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
|
|