Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
87
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
2fd05d3f
Commit
2fd05d3f
authored
10 years ago
by
Adam Wujek
Browse files
Options
Downloads
Patches
Plain Diff
userspace/libwr: clean up of pio.c
removed: shw_pio_configure_all kept for debugging: shw_pio_toggle_pin
parent
ca5c04cb
Branches
Branches containing commit
Tags
Tags containing commit
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/include/pio.h
+0
-1
0 additions, 1 deletion
userspace/include/pio.h
userspace/libwr/pio.c
+1
-13
1 addition, 13 deletions
userspace/libwr/pio.c
with
1 addition
and
14 deletions
userspace/include/pio.h
+
0
−
1
View file @
2fd05d3f
...
...
@@ -59,7 +59,6 @@ void shw_set_fp_led(int led, int state);
int
shw_pio_mmap_init
();
void
shw_pio_toggle_pin
(
pio_pin_t
*
pin
,
uint32_t
udelay
);
void
shw_pio_configure_all
();
void
shw_pio_configure
(
const
pio_pin_t
*
pin
);
static
inline
void
shw_pio_set
(
const
pio_pin_t
*
pin
,
int
state
)
...
...
This diff is collapsed.
Click to expand it.
userspace/libwr/pio.c
+
1
−
13
View file @
2fd05d3f
...
...
@@ -27,7 +27,7 @@ volatile uint8_t *_sys_base;
void
pmc_enable_clock
(
int
clock
)
static
void
pmc_enable_clock
(
int
clock
)
{
_writel
(
_sys_base
+
AT91C_BASE_PMC_RAW
-
AT91C_BASE_SYS_RAW
+
0x10
,
(
1
<<
clock
));
// fucking atmel headers
// printf("ClkStat: %x\n", _readl(_sys_base + AT91C_BASE_PMC_RAW - AT91C_BASE_SYS_RAW + 0x18));
...
...
@@ -97,18 +97,6 @@ void shw_pio_toggle_pin(pio_pin_t* pin, uint32_t udelay)
}
}
void
shw_pio_configure_all
()
{
int
i
;
const
shw_io_t
*
all_io
=
(
shw_io_t
*
)
_all_shw_io
;
for
(
i
=
0
;
i
<
NUM_SHW_IO_ID
;
i
++
)
{
if
(
all_io
[
i
].
type
==
SHW_CPU_PIO
)
shw_pio_configure
(
all_io
[
i
].
ptr
);
}
}
void
shw_pio_configure
(
const
pio_pin_t
*
pin
)
{
uint32_t
mask
=
(
1
<<
pin
->
pin
);
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment