Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
e4ac87fe
Commit
e4ac87fe
authored
Nov 19, 2014
by
Jeroen Vreeken
Browse files
add debugging
parent
e314e30f
Changes
2
Hide whitespace changes
Inline
Side-by-side
controller/am335x/block_am335x_gpi.c
View file @
e4ac87fe
...
...
@@ -46,6 +46,7 @@ static void gpi_calculate(struct controller_block *gpi)
reg
=
am335x_read32
(
base
,
AM335X_GPIO_REG_DATAIN
);
in
=
reg
&
gpi
->
private
->
bitmask
;
log_send
(
LOG_T_DEBUG
,
"%s: 0x%lx 0x%lx %d"
,
gpo
->
name
,
reg
,
gpi
->
private
->
bitmask
,
in
);
priv
->
in
=
in
;
}
...
...
@@ -133,6 +134,8 @@ struct controller_block * block_am335x_gpi_create(char *name, va_list ap)
gpi
->
private
->
bitmask
=
1
<<
pin_nr
;
notpin
=
~
gpi
->
private
->
bitmask
;
am335x_write32
(
base
,
AM335X_GPIO_REG_CTRL
,
0
);
am335x_write32
(
base
,
AM335X_GPIO_REG_LEVELDETECT0
,
am335x_read32
(
base
,
AM335X_GPIO_REG_LEVELDETECT0
)
&
notpin
);
am335x_write32
(
base
,
AM335X_GPIO_REG_LEVELDETECT1
,
...
...
controller/am335x/block_am335x_gpo.c
View file @
e4ac87fe
...
...
@@ -50,6 +50,10 @@ static void gpo_calculate(struct controller_block *gpo)
AM335X_GPIO_REG_SETDATAOUT
:
AM335X_GPIO_REG_CLEARDATAOUT
;
am335x_write32
(
base
,
regoff
,
gpo
->
private
->
bitmask
);
reg
=
am335x_read32
(
base
,
AM335X_GPIO_REG_DATAOUT
);
log_send
(
LOG_T_DEBUG
,
"%s: 0x%lx 0x%lx %d"
,
gpo
->
name
,
reg
,
gpi
->
private
->
bitmask
,
out
);
}
...
...
@@ -135,6 +139,8 @@ struct controller_block * block_am335x_gpo_create(char *name, va_list ap)
gpo
->
private
->
bitmask
=
1
<<
pin_nr
;
notpin
=
~
gpo
->
private
->
bitmask
;
am335x_write32
(
base
,
AM335X_GPIO_REG_CTRL
,
0
);
am335x_write32
(
base
,
AM335X_GPIO_REG_LEVELDETECT0
,
am335x_read32
(
base
,
AM335X_GPIO_REG_LEVELDETECT0
)
&
notpin
);
am335x_write32
(
base
,
AM335X_GPIO_REG_LEVELDETECT1
,
...
...
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