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
31a25094
Commit
31a25094
authored
Oct 21, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various: use "%02x" format, which works with both printf
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6307d0ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
onewire.c
dev/onewire.c
+3
-2
cmd_mac.c
shell/cmd_mac.c
+1
-1
No files found.
dev/onewire.c
View file @
31a25094
...
...
@@ -56,7 +56,8 @@ int8_t get_persistent_mac(uint8_t portnum, uint8_t * mac)
for
(
i
=
0
;
i
<
devsnum
;
++
i
)
{
//#if DEBUG_PMAC
mprintf
(
"Found device: %x:%x:%x:%x:%x:%x:%x:%x
\n
"
,
mprintf
(
"Found device: "
"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x
\n
"
,
FamilySN
[
i
][
7
],
FamilySN
[
i
][
6
],
FamilySN
[
i
][
5
],
FamilySN
[
i
][
4
],
FamilySN
[
i
][
3
],
FamilySN
[
i
][
2
],
FamilySN
[
i
][
1
],
FamilySN
[
i
][
0
]);
//#endif
...
...
@@ -89,7 +90,7 @@ int8_t get_persistent_mac(uint8_t portnum, uint8_t * mac)
out
=
0
;
#if DEBUG_PMAC
mprintf
(
"Using EEPROM page: "
"%
x:%x:%x:%x:%x:%
x
\n
"
,
"%
02x:%02x:%02x:%02x:%02x:%02
x
\n
"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
],
mac
[
4
],
mac
[
5
]);
#endif
...
...
shell/cmd_mac.c
View file @
31a25094
...
...
@@ -44,7 +44,7 @@ int cmd_mac(const char *args[])
return
-
EINVAL
;
}
mprintf
(
"MAC-address: %
x:%x:%x:%x:%x:%
x
\n
"
,
mprintf
(
"MAC-address: %
02x:%02x:%02x:%02x:%02x:%02
x
\n
"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
],
mac
[
4
],
mac
[
5
]);
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