1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

Merge pull request #6551 from miri64/fmt/enh/print_byte_hex

fmt: add print_byte_hex() helper
This commit is contained in:
Martine Lenders 2017-02-06 12:08:22 +01:00 committed by GitHub
commit beaa214b83
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
*