Skip to content

Instantly share code, notes, and snippets.

@madex
Created November 27, 2015 15:08
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 madex/4ca8dfa8db94155baf5e to your computer and use it in GitHub Desktop.
Save madex/4ca8dfa8db94155baf5e to your computer and use it in GitHub Desktop.
helper for hex parsing
uint8_t hexCharToNibbel(char hexChar) {
return (hexChar >= '0' && hexChar <= '9') ? hexChar - '0' :
(hexChar >= 'A' && hexChar <= 'F') ? hexChar - 'A' + 10 : 16;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment