Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
b203c177
Commit
b203c177
authored
Aug 10, 2016
by
Damien George
Browse files
esp8266: Fix reading of pin object for GPIO16.
Pin(16) now works as an input.
parent
2146cdab
Changes
1
Hide whitespace changes
Inline
Side-by-side
esp8266/modpybpin.c
View file @
b203c177
...
...
@@ -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
]));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment