1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

fmt: add print_byte_hex() helper

This commit is contained in:
Martine Lenders 2017-02-03 15:09:15 +01:00
parent 04f6e15fbd
commit 0cd2b746cc
2 changed files with 14 additions and 0 deletions

View File

@ -290,6 +290,13 @@ void print_s32_dec(int32_t val)
print(buf, len);
}
void print_byte_hex(uint8_t byte)
{
char buf[2];
fmt_byte_hex(buf, byte);
print(buf, sizeof(buf));
}
void print_u32_hex(uint32_t val)
{
char buf[8];

View File

@ -245,6 +245,13 @@ void print_u32_dec(uint32_t val);
*/
void print_s32_dec(int32_t val);
/**
* @brief Print byte value as hex to stdout
*
* @param[in] byte Byte value to print
*/
void print_byte_hex(uint8_t byte);
/**
* @brief Print uint32 value as hex to stdout
*