|
@@ -439,6 +439,17 @@ static inline char *hex_byte_pack(char *buf, u8 byte)
|
|
|
return buf;
|
|
|
}
|
|
|
|
|
|
+extern const char hex_asc_upper[];
|
|
|
+#define hex_asc_upper_lo(x) hex_asc_upper[((x) & 0x0f)]
|
|
|
+#define hex_asc_upper_hi(x) hex_asc_upper[((x) & 0xf0) >> 4]
|
|
|
+
|
|
|
+static inline char *hex_byte_pack_upper(char *buf, u8 byte)
|
|
|
+{
|
|
|
+ *buf++ = hex_asc_upper_hi(byte);
|
|
|
+ *buf++ = hex_asc_upper_lo(byte);
|
|
|
+ return buf;
|
|
|
+}
|
|
|
+
|
|
|
static inline char * __deprecated pack_hex_byte(char *buf, u8 byte)
|
|
|
{
|
|
|
return hex_byte_pack(buf, byte);
|