Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
2fd05d3f
Commit
2fd05d3f
authored
Oct 15, 2014
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/libwr: clean up of pio.c
removed: shw_pio_configure_all kept for debugging: shw_pio_toggle_pin
parent
ca5c04cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
14 deletions
+1
-14
pio.h
userspace/include/pio.h
+0
-1
pio.c
userspace/libwr/pio.c
+1
-13
No files found.
userspace/include/pio.h
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
)
...
...
userspace/libwr/pio.c
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
);
...
...
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