-
Notifications
You must be signed in to change notification settings - Fork 48
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
Any intention to support an EEPROM 'fake' #40
Comments
Hi, I'm not planing on working on it, But there are instructions here explaining how to make a PR adding support : It will looks something like this: |
Wow what a coincidence! I just dug up a project I abandoned 3 years ago and now remembering it was because I did not understand how to write a test for a file that uses @FabioBatSilva when you say "i think it should be supported" do you mean that you think it already should work, or are you suggesting that we should try to add it ourselves? |
@wraybowling I mean something we should support. Yes, something that you or someone else interested can contribute following the example/doc i linked. |
I started playing with making ArduinoFake support EEPROM but quickly realized that the biggest problem is going to be the use of templates. Since you can't use templates and virtual methods, there's really no way to support the ability to read and write arbitrary datatypes. @david284 How does the library you're using interact with @FabioBatSilva If you think it's worth it to have a partially supported EEPROM, I can send a PR for my limited functionality one. It would at least be a start in case someone wanted to add more functionality (like array access, which I didn't implement) but I kinda hate adding something that's "broken" |
The library is using byte orientated read/writes I believe
byte readEEPROM(unsignedinteeaddress);
voidwriteEEPROM(unsignedinteeaddress, byte data);
byte readBytesEEPROM(unsignedinteeaddress, byte nbytes, byte dest[]);
voidwriteBytesEEPROM(unsignedinteeaddress, byte src[], byte numbytes);
If that's what you're asking
Regards
David
…On 18/05/2023 00:07, wrong-kendall wrote:
I started playing with making ArduinoFake support EEPROM
<wrong-kendall@16f286a>
but quickly realized that the biggest problem is going to be the use
of templates. Since you can't use templates and virtual methods,
there's really no way to support the ability to read and write
arbitrary datatypes.
@david284 <https://github.com/david284> How does the library you're
using interact with |EEPROM.h|?
@FabioBatSilva <https://github.com/FabioBatSilva> If you think it's
worth it to have a partially supported EEPROM, I can send a PR for my
limited functionality one. It would at least be a start in case
someone wanted to add more functionality (like array access, which I
didn't implement) but I kinda hate adding something that's "broken"
—
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANUGDYIZZP2ELWH4Q2WRWFTXGVK37ANCNFSM6AAAAAAU3OVMLE>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks, that's exactly what I was asking and that's the only functionality that my change implements. |
One of the libraries I'm using expects 'EEPROM.h'
Is there any intention to support a version of this in ArduinoFake?
The text was updated successfully, but these errors were encountered: