-
Notifications
You must be signed in to change notification settings - Fork 0
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
Compatibility with new pointer-wrapper ProgMem
#1
Comments
I have no objections to your change breaking If you want to use the |
Actually, the original motivation for |
That's alright. Then I will merge that change when I completed it, after which I' going to release the
I quite like the
It depends on what you do, if you have something like this: #[cfg_attr(target_arch = "avr", link_section = ".progmem.data")]
static MESSAGE3: &str = "apple"; you would be entirely correct, that only the pointer and length would be stored in progmem whereas the actual content (i.e. "apple") would be stored in RAM. As you pointed out, avr_progmem::progmem! {
static progmem string MESSAGE3 = "apple";
} Then the |
In my latest commit, I changed the internals of the
ProgMem
wrapper from being a wrapper around a value that is stored in progmem to a wrapper around a pointer that point to another static that in turn is stored in progmem. I haven't merged this yet to thev0.2
branch (see Cryptjar/avr-progmem-rs#5), because I noticed this will break youravr_progmem_str
macro.Unfortunately, this change of
ProgMem
makes its constructor to take a pointer instead of a value. This means thatPmString
can't be created by-value either (such as an array), and thus I had to remove thePmString::from_array
constructor that youravr_progmem_str
macro uses, sorry.However, the good news is, that the new way in which the
PmString
s are created means that there is no more need for#![feature(const_option)]
, which seems to have been the motivation foravr_progmem_str
.cc Cryptjar/avr-progmem-rs#3
The text was updated successfully, but these errors were encountered: