summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/esp_mphal.c
diff options
context:
space:
mode:
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r--esp8266/esp_mphal.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c
index 7ecc7776aa..61848fd343 100644
--- a/esp8266/esp_mphal.c
+++ b/esp8266/esp_mphal.c
@@ -1,5 +1,5 @@
/*
- * This file is part of the Micro Python project, http://micropython.org/
+ * This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
@@ -208,28 +208,6 @@ void mp_hal_signal_dupterm_input(void) {
system_os_post(DUPTERM_TASK_ID, 0, 0);
}
-void mp_hal_pin_open_drain(mp_hal_pin_obj_t pin_id) {
- const pyb_pin_obj_t *pin = &pyb_pin_obj[pin_id];
-
- if (pin->phys_port == 16) {
- // configure GPIO16 as input with output register holding 0
- WRITE_PERI_REG(PAD_XPD_DCDC_CONF, (READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | 1);
- WRITE_PERI_REG(RTC_GPIO_CONF, READ_PERI_REG(RTC_GPIO_CONF) & ~1);
- WRITE_PERI_REG(RTC_GPIO_ENABLE, (READ_PERI_REG(RTC_GPIO_ENABLE) & ~1)); // input
- WRITE_PERI_REG(RTC_GPIO_OUT, (READ_PERI_REG(RTC_GPIO_OUT) & ~1)); // out=0
- return;
- }
-
- ETS_GPIO_INTR_DISABLE();
- PIN_FUNC_SELECT(pin->periph, pin->func);
- GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(pin->phys_port)),
- GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(pin->phys_port)))
- | GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE)); // open drain
- GPIO_REG_WRITE(GPIO_ENABLE_ADDRESS,
- GPIO_REG_READ(GPIO_ENABLE_ADDRESS) | (1 << pin->phys_port));
- ETS_GPIO_INTR_ENABLE();
-}
-
// Get pointer to esf_buf bookkeeping structure
void *ets_get_esf_buf_ctlblk(void) {
// Get literal ptr before start of esf_rx_buf_alloc func