mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-05-14 05:52:49 +00:00
init
This commit is contained in:
commit
9b80e8676c
95 changed files with 6502 additions and 0 deletions
12
hex.h
Normal file
12
hex.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
static const char hext[] = "0123456789ABCDEF";
|
||||
static void printhex(const char *z, size_t l)
|
||||
{
|
||||
printf("[");
|
||||
for (size_t i = 0; i < l; ++i) {
|
||||
printf("%c%c", hext[*z >> 4], hext[*z & 0xF]);
|
||||
++z;
|
||||
}
|
||||
printf("]\n");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue