Skip to content

Instantly share code, notes, and snippets.

@orotemo
Created January 7, 2016 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orotemo/e5a43d92ec1c10c1c838 to your computer and use it in GitHub Desktop.
Save orotemo/e5a43d92ec1c10c1c838 to your computer and use it in GitHub Desktop.
void hex_print(byte *buf, int n) {
fprintf(stderr, "<<");
for (int i = 0; i < n; i++)
{
fprintf(stderr, "16#%02X", buf[i]);
if (i < n-1) fprintf(stderr, ",");
}
fprintf(stderr,">>\r\n");
fflush(stderr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment