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

Method hex_adr_val

Marlin/src/gcode/parser.h:439–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437 #if ENABLED(MARLIN_DEV_MODE)
438
439 static uint8_t* hex_adr_val(const char c, uint8_t * const dval=nullptr) {
440 if (!seen(c) || *value_ptr != 'x') return dval;
441 uint8_t *out = nullptr;
442 for (char *vp = value_ptr + 1; HEXCHR(*vp) >= 0; vp++)
443 out = (uint8_t*)((uintptr_t(out) << 8) | HEXCHR(*vp));
444 return out;
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;

Callers 1

DMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected