FreeCalypso > hg > freecalypso-tools
view uptools/libcoding/hexdecode2.c @ 976:ff4ce8d5ece4
fc-loadtool flash: definitions for AMD sector lock architecture
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Fri, 01 Dec 2023 06:43:21 +0000 |
| parents | ec7e23d5151f |
| children |
line wrap: on
line source
/* * This module is a subset of hexdigits.c from fc-sim-tools/libutil. */ decode_hex_digit(c) { if (c >= '0' && c <= '9') return(c - '0'); if (c >= 'A' && c <= 'F') return(c - 'A' + 10); if (c >= 'a' && c <= 'f') return(c - 'a' + 10); return(-1); }
