Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added to stash prepare and extract #403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/stash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ void Stash::prepare (const char* fmt PROGMEM, ...) {
arglen = stash.size();
break;
}
case 'R':{
arglen = argval;
argval = va_arg(ap, uint16_t);
break;
}
}
#ifdef __AVR__
*segs++ = argval;
Expand Down Expand Up @@ -237,6 +242,7 @@ void Stash::extract (uint16_t offset, uint16_t count, void* buf) {
case 'S':
case 'F':
case 'E':
case 'R':
ptr = (char*) arg;
break;
case 'H':
Expand All @@ -248,6 +254,7 @@ void Stash::extract (uint16_t offset, uint16_t count, void* buf) {
}
case 'D':
case 'S':
case 'R':
c = *ptr++;
break;
case 'F':
Expand All @@ -260,7 +267,7 @@ void Stash::extract (uint16_t offset, uint16_t count, void* buf) {
c = ((Stash*) ptr)->get();
break;
}
if (c == 0) {
if (c == 0 && mode != 'R') {
mode = '@';
continue;
}
Expand Down