From b203c1774e4eb6bb6bc04b99d0a5f06f0aa04e40 Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Wed, 10 Aug 2016 12:44:47 +1000
Subject: [PATCH] esp8266: Fix reading of pin object for GPIO16.

Pin(16) now works as an input.
---
 esp8266/modpybpin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/esp8266/modpybpin.c b/esp8266/modpybpin.c
index 166d6f566..79406867a 100644
--- a/esp8266/modpybpin.c
+++ b/esp8266/modpybpin.c
@@ -301,7 +301,7 @@ STATIC mp_obj_t pyb_pin_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw,
     pyb_pin_obj_t *self = self_in;
     if (n_args == 0) {
         // get pin
-        return MP_OBJ_NEW_SMALL_INT(GPIO_INPUT_GET(self->phys_port));
+        return MP_OBJ_NEW_SMALL_INT(pin_get(self->phys_port));
     } else {
         // set pin
         pin_set(self->phys_port, mp_obj_is_true(args[0]));
-- 
GitLab