mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/fmt: add print_bytes_hex()
This commit is contained in:
parent
e710b6f07c
commit
95e654f232
@ -550,6 +550,15 @@ void print_byte_hex(uint8_t byte)
|
|||||||
print(buf, sizeof(buf));
|
print(buf, sizeof(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void print_bytes_hex(const void *bytes, size_t num)
|
||||||
|
{
|
||||||
|
const uint8_t *b = bytes;
|
||||||
|
|
||||||
|
while (num--) {
|
||||||
|
print_byte_hex(*b++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void print_u32_hex(uint32_t val)
|
void print_u32_hex(uint32_t val)
|
||||||
{
|
{
|
||||||
char buf[8];
|
char buf[8];
|
||||||
|
@ -450,6 +450,14 @@ void print_s32_dec(int32_t val);
|
|||||||
*/
|
*/
|
||||||
void print_byte_hex(uint8_t byte);
|
void print_byte_hex(uint8_t byte);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Print bytes as hex to stdout
|
||||||
|
*
|
||||||
|
* @param[in] bytes Byte array to print
|
||||||
|
* @param[in] n Number of bytes to print
|
||||||
|
*/
|
||||||
|
void print_bytes_hex(const void *bytes, size_t n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Print uint32 value as hex to stdout
|
* @brief Print uint32 value as hex to stdout
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user