M261 S I2C output format (#22890)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
Stuart Pittaway
2021-10-11 23:42:29 +01:00
committed by Scott Lahteine
parent 64128a5bcb
commit f3be03da20
4 changed files with 64 additions and 16 deletions

View File

@ -27,7 +27,7 @@
// Utility functions to create and print hex strings as nybble, byte, and word.
//
FORCE_INLINE char hex_nybble(const uint8_t n) {
constexpr char hex_nybble(const uint8_t n) {
return (n & 0xF) + ((n & 0xF) < 10 ? '0' : 'A' - 10);
}
char* hex_byte(const uint8_t b);