Created
November 27, 2015 15:08
-
-
Save madex/4ca8dfa8db94155baf5e to your computer and use it in GitHub Desktop.
helper for hex parsing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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