Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
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
Software for White Rabbit PTP Core
Commits
2f883ce3
Commit
2f883ce3
authored
Dec 13, 2011
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrcore_v2: replacing gpio.h with syscon.h
parent
20e1cc91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
dna.c
dev/dna.c
+2
-2
i2c.c
dev/i2c.c
+4
-9
softpll.c
dev/softpll.c
+0
-1
No files found.
dev/dna.c
View file @
2f883ce3
#include "board.h"
#include "
gpio
.h"
#include "
syscon
.h"
#define DNA_DATA 1
#define DNA_CLK 4
...
...
@@ -47,4 +47,4 @@ void dna_read(uint32_t *lo, uint32_t *hi)
*
hi
=
(
uint32_t
)
(
dna
>>
32
);
*
lo
=
(
uint32_t
)
dna
;
}
\ No newline at end of file
}
dev/i2c.c
View file @
2f883ce3
#include "types.h"
#include "board.h"
#include "
gpio
.h"
#include "
syscon
.h"
#define I2C_DELAY 100
...
...
@@ -10,9 +10,9 @@ static void mi2c_delay()
for
(
i
=
0
;
i
<
I2C_DELAY
;
i
++
)
asm
volatile
(
"nop"
);
}
#define M_SDA_OUT(x) { gpio_out(GPIO_
PIN_SDA_OUT
, x); mi2c_delay(); }
#define M_SCL_OUT(x) { gpio_out(GPIO_
PIN_SCL_OUT
, x); mi2c_delay(); }
#define M_SDA_IN gpio_in(GPIO_
PIN_SDA_IN
)
#define M_SDA_OUT(x) { gpio_out(GPIO_
SDA
, x); mi2c_delay(); }
#define M_SCL_OUT(x) { gpio_out(GPIO_
SCL
, x); mi2c_delay(); }
#define M_SDA_IN gpio_in(GPIO_
SDA
)
void
mi2c_start
()
{
...
...
@@ -81,11 +81,6 @@ void mi2c_get_byte(unsigned char *data)
void
mi2c_init
()
{
gpio_dir
(
GPIO_PIN_SDA_OUT
,
1
);
gpio_dir
(
GPIO_PIN_SCL_OUT
,
1
);
gpio_dir
(
GPIO_PIN_SDA_IN
,
0
);
M_SCL_OUT
(
1
);
M_SDA_OUT
(
1
);
}
...
...
dev/softpll.c
View file @
2f883ce3
...
...
@@ -13,7 +13,6 @@ White Rabbit Softcore PLL (SoftPLL)
#include <hw/softpll_regs.h>
#include "gpio.h"
#include "softpll.h"
/* Bit size of phase tags generated by the DMTDs. Used to sign-extend the tags. */
...
...
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