Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t outputByte;
- // Get first part of hexadecimal
- tok = (uint8_t)ti_GetC(ice.inPrgm);
- if (tok >= t0 && tok <= t9) {
- outputByte = tok - t0;
- } else if (tok >= tA && tok <= tF) {
- outputByte = tok - tA + 0x0A;
- } else {
- return E_INVALID_ICON;
- }
- outputByte <<= 4;
- // Get second part of hexadecimal
- tok = (uint8_t)ti_GetC(ice.inPrgm);
- if (tok >= 0 && tok <= t9) {
- outputByte |= tok - t0;
- } else if (tok >= tA && tok <= tF) {
- outputByte |= tok - tA + 0x0A;
- } else {
- return E_INVALID_ICON;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement