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
32
Issues
32
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
20e1cc91
Commit
20e1cc91
authored
Dec 13, 2011
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrcore_v2: genraminit modified for new dpram initializing function
parent
1d173574
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
genraminit.c
tools/genraminit.c
+21
-16
No files found.
tools/genraminit.c
View file @
20e1cc91
...
...
@@ -3,19 +3,24 @@
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
<
3
)
return
-
1
;
FILE
*
f
=
fopen
(
argv
[
1
],
"rb"
);
if
(
!
f
)
return
-
1
;
unsigned
char
x
[
4
];
int
i
=
0
;
int
n
=
atoi
(
argv
[
2
]);
while
(
!
feof
(
f
))
{
fread
(
x
,
1
,
4
,
f
);
printf
(
"write %x %02X%02X%02X%02X
\n
"
,
i
++
,
x
[
0
],
x
[
1
],
x
[
2
],
x
[
3
]);
}
fclose
(
f
);
return
0
;
}
\ No newline at end of file
if
(
argc
<
3
)
return
-
1
;
FILE
*
f
=
fopen
(
argv
[
1
],
"rb"
);
if
(
!
f
)
return
-
1
;
unsigned
char
x
[
4
];
int
i
=
0
;
int
n
=
atoi
(
argv
[
2
]);
while
(
!
feof
(
f
))
{
fread
(
x
,
1
,
4
,
f
);
printf
(
"write %x %02X%02X%02X%02X
\n
"
,
i
++
,
x
[
0
],
x
[
1
],
x
[
2
],
x
[
3
]);
}
for
(;
i
<
n
;)
{
printf
(
"write %x %02X%02X%02X%02X
\n
"
,
i
++
,
0
,
0
,
0
,
0
);
}
fclose
(
f
);
return
0
;
}
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