-
Notifications
You must be signed in to change notification settings - Fork 5
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
Small Feature requests #1
Comments
YEah, I just rushed it through to get it added before the weekend, most of these are planned for tonight. This is a read only version of the EEWrap lib for progmem, so the data cannot use assignment operators. Gotta rush off I'll answer the other questions tonight. Thanks for the report. |
I can certainly add in a size_t variant. What would you name it? I can add in a
I just use include guards to do the same thing. However the newer versions of GCC may have better optimizations for this (
As mentioned above, the types provided are just like traditional PROGMEM data and is
The
I'll make this into a documented example, for both EEWrap & PGMWrap.
Yes, however the PROGMEM (not my lib) does have a limitation: basically as PROGMEM data must be set at compile time, you'd have to have a global or class-static to initialize it. The EEWrap does not require this as you can write to it at any time (and the IDE does not load ee init data anyway). However there is nothing stopping you from using this to point to static data, for instance: user defined data passed into a class:
I've still got to add in some conversions so you will not need to use a cast ( There is also the benefit (once I've added the conversions) to overload functions which can accept PROGMEM data, as well as standard RAM based data.
As the objects reside in either EEPROM or PROGMEM only a pointer is emitted. The whole object will be compiled out to either read or write operations (just like my EEPROM lib already in the AVR core.) The only time the pointer will hang around in memory is when used in a non-static algorithm like the pointer in the Foo object from my second example, where it is used with a run-time only offset. But PGMWrap objects used in static code will disappear entirely leaving only the essential code (e.g.
Once I have the libs at a stable and well documented/tested design, I do not see why they couldn't become a staple part of the core. |
Yep. On avr it should be equal to uint16_t.
I read up on this and just #pragma makes more sense. However I added an identifier to see if a library is available. I also used this identifier as version identificater and do this in all of my libraries now:
How dumb... sorry you are right^^
Holy! (just never use float examples on avr please. Also never comment at the right, only above (because of scrolling and the look of the code) But that sounds amazing!
Great! Thx for the feedback :) |
Hello, I am a new user to GitHub, I have been looking for software with these functions for a while sorry if this is in the wrong place forgot to say I used you software to store very large ( >100k byte ) arrays for DotStar Pixel patterns |
I've got an ESP, so I can test it. As far as I thought However if @igrr has implemented the ESP version of I'll check it out when I'm at home (just got to work), and I'll let you know. |
Hello, I just started to love this library! Thanks |
Hello WARNING: library PGMWrap claims to run on [avr] architecture(s) and may be incompatible with your current board which runs on [esp8266] architecture(s). i didnt know what to alter to prevent this i crammed 72 arrays approximately 4,400 bytes each into an ESP -12E Sketch uses 468,801 bytes (44%) of program storage space. Maximum is 1,044,464 bytes. the sketch i wrote was over 33,000 lines long due to the arrays the Arduino IDE is 1.6.8 with all the bits and bobs for ESP Hope this helps as this library made my task so much simpler Tiggr |
Thanks Tiggr for the update and good explanation. I did the same change and also got it to work. I can live with that warning. :) I guess that you need the a fast CPU to update all LEDs, so ESP seems as a good choice. |
Glad it helped |
Cheers guys for testing :) I will look around to see if I can mark the library as suitable for the esp. As far as I know the lib manager only supports AVR, Sam, All (*) |
You're Welcome Chris |
Yeah, I'll post any news. |
I have found the source, and yes PGMWrap is fine to use with the ESP8266 because all the AVR defines have been re purposed for ESP8266: pgmspace.h, pgmspace.cpp |
I just saw your library, didnt use it yet but had a few notes:
#pragma once
?I also saw your EEPROM Wrap library. Both are looking very cool, I will take a look at this for sure in the future. Are you sure that there wont be any overhead? If so, why dont "they" use it in the upstream, like in the avr libs or at least inside the Arduino project?
The text was updated successfully, but these errors were encountered: