Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
f49d3a47
Commit
f49d3a47
authored
Jul 31, 2012
by
Alejandro Mery
Browse files
pio: fix pio_get()'s data extraction
parent
0d2d96c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
pio.c
View file @
f49d3a47
...
@@ -98,7 +98,7 @@ static int pio_get(const char *buf, uint32_t port, uint32_t port_num, struct pio
...
@@ -98,7 +98,7 @@ static int pio_get(const char *buf, uint32_t port, uint32_t port_num, struct pio
if
(
pio
->
mul_sel
>
1
)
if
(
pio
->
mul_sel
>
1
)
pio
->
data
=
-
1
;
pio
->
data
=
-
1
;
else
{
else
{
val
=
LE32TOH
(
PIO_REG_
CFG
(
buf
,
port
,
port_num_func
));
val
=
LE32TOH
(
PIO_REG_
DATA
(
buf
,
port
));
pio
->
data
=
(
val
>>
port_num
)
&
0x01
;
pio
->
data
=
(
val
>>
port_num
)
&
0x01
;
}
}
return
1
;
return
1
;
...
...
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