Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
b203c177
Commit
b203c177
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
esp8266: Fix reading of pin object for GPIO16.
Pin(16) now works as an input.
parent
2146cdab
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
esp8266/modpybpin.c
+1
-1
1 addition, 1 deletion
esp8266/modpybpin.c
with
1 addition
and
1 deletion
esp8266/modpybpin.c
+
1
−
1
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,
...
@@ -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
;
pyb_pin_obj_t
*
self
=
self_in
;
if
(
n_args
==
0
)
{
if
(
n_args
==
0
)
{
// get pin
// 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
{
}
else
{
// set pin
// set pin
pin_set
(
self
->
phys_port
,
mp_obj_is_true
(
args
[
0
]));
pin_set
(
self
->
phys_port
,
mp_obj_is_true
(
args
[
0
]));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment