summaryrefslogtreecommitdiff
path: root/ports/esp8266/esp_mphal.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp8266/esp_mphal.h')
-rw-r--r--ports/esp8266/esp_mphal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/ports/esp8266/esp_mphal.h b/ports/esp8266/esp_mphal.h
index 194e56f64..56d9fa35f 100644
--- a/ports/esp8266/esp_mphal.h
+++ b/ports/esp8266/esp_mphal.h
@@ -34,12 +34,15 @@ struct _mp_print_t;
// Structure for UART-only output via mp_printf()
extern const struct _mp_print_t mp_debug_print;
-extern ringbuf_t input_buf;
-// Call this after putting data to input_buf
+extern ringbuf_t stdin_ringbuf;
+// Call this after putting data to stdin_ringbuf
void mp_hal_signal_input(void);
// Call this when data is available in dupterm object
void mp_hal_signal_dupterm_input(void);
+// This variable counts how many times the UART is attached to dupterm
+extern int uart_attached_to_dupterm;
+
void mp_hal_init(void);
void mp_hal_rtc_init(void);
@@ -86,7 +89,7 @@ void mp_hal_pin_open_drain(mp_hal_pin_obj_t pin);
} while (0)
#define mp_hal_pin_od_high(p) do { \
if ((p) == 16) { WRITE_PERI_REG(RTC_GPIO_ENABLE, (READ_PERI_REG(RTC_GPIO_ENABLE) & ~1)); } \
- else { gpio_output_set(1 << (p), 0, 1 << (p), 0); } \
+ else { gpio_output_set(0, 0, 0, 1 << (p)); /* set as input to avoid glitches */ } \
} while (0)
#define mp_hal_pin_read(p) pin_get(p)
#define mp_hal_pin_write(p, v) pin_set((p), (v))