| 14 | |
| 15 | #define __is_print(ch) ((unsigned int)((ch) - ' ') < 127u - ' ') |
| 16 | void Ft_DumpHexByte(const u8 *ptr, ft_base_t buflen) |
| 17 | { |
| 18 | unsigned char *buf = (unsigned char *)ptr; |
| 19 | int i, j; |
| 20 | |
| 21 | for (i = 0; i < buflen; i += 16) |
| 22 | { |
| 23 | Ft_printf("0x%08X: ", ptr + i); |
| 24 | |
| 25 | for (j = 0; j < 16; j++) |
| 26 | if (i + j < buflen) |
| 27 | Ft_printf("%02X ", buf[i + j]); |
| 28 | else |
| 29 | Ft_printf(" "); |
| 30 | Ft_printf(" "); |
| 31 | |
| 32 | for (j = 0; j < 16; j++) |
| 33 | if (i + j < buflen) |
| 34 | Ft_printf("%c", __is_print(buf[i + j]) ? buf[i + j] : '.'); |
| 35 | Ft_printf("\r\n"); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | void Ft_DumpHexWord(const u32 *ptr, ft_base_t buflen) |
| 40 | { |
nothing calls this directly
no test coverage detected