Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
350cb6bf
Commit
350cb6bf
authored
Apr 21, 2014
by
Damien George
Browse files
stmhal: Fix bug with pin GPIO reading.
parent
ef255e47
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/pin.c
View file @
350cb6bf
...
...
@@ -246,7 +246,7 @@ STATIC mp_obj_t pin_value(uint n_args, mp_obj_t *args) {
pin_obj_t
*
self
=
args
[
0
];
if
(
n_args
==
1
)
{
// get pin
return
MP_OBJ_NEW_SMALL_INT
((
self
->
gpio
->
IDR
>>
self
->
p
ort
)
&
1
);
return
MP_OBJ_NEW_SMALL_INT
((
self
->
gpio
->
IDR
>>
self
->
p
in
)
&
1
);
}
else
{
// set pin
if
(
mp_obj_is_true
(
args
[
1
]))
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment