MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / hex_val

Method hex_val

Marlin/src/gcode/parser.h:447–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445 }
446
447 static uint16_t hex_val(const char c, uint16_t const dval=0) {
448 if (!seen(c) || *value_ptr != 'x') return dval;
449 uint16_t out = 0;
450 for (char *vp = value_ptr + 1; HEXCHR(*vp) >= 0; vp++)
451 out = ((out) << 8) | HEXCHR(*vp);
452 return out;
453 }
454
455 #endif
456};

Callers 1

DMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected