Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1efcb863
authored
Oct 19, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add function to print 64 bit int (qword) to serial
parent
2091e32c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
src/serial.c
src/serial.h
src/serial.c
View file @
1efcb863
...
@@ -47,6 +47,14 @@ void serial_hexword(uint32_t x)
...
@@ -47,6 +47,14 @@ void serial_hexword(uint32_t x)
}
}
}
}
void
serial_hexqword
(
uint64_t
x
)
{
for
(
int
i
=
15
;
i
>=
0
;
i
--
)
{
serial_writechar
(
hexchars
[
x
>>
i
*
4
&
0xf
]);
}
}
void
serial_hexstring
(
void
*
s
,
uint32_t
n
)
{
void
serial_hexstring
(
void
*
s
,
uint32_t
n
)
{
char
*
d
=
(
char
*
)
s
;
char
*
d
=
(
char
*
)
s
;
for
(
uint32_t
i
=
0
;
i
<
n
;
i
++
)
for
(
uint32_t
i
=
0
;
i
<
n
;
i
++
)
...
...
src/serial.h
View file @
1efcb863
...
@@ -22,6 +22,7 @@ void serial_writestring(char* s);
...
@@ -22,6 +22,7 @@ void serial_writestring(char* s);
// Function to write a 4 byte word toserial in hex
// Function to write a 4 byte word toserial in hex
void
serial_hexword
(
uint32_t
x
);
void
serial_hexword
(
uint32_t
x
);
void
serial_hexqword
(
uint64_t
x
);
void
serial_hexstring
(
void
*
s
,
uint32_t
n
);
void
serial_hexstring
(
void
*
s
,
uint32_t
n
);
#endif
#endif
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