Closed nagimov closed 4 years ago
@nuno-silva
Yes if it could be implemented similarly to dnsLookup
and accept optional fromRam
flag that would be ideal:
https://github.com/njh/EtherCard/blob/420dd84ca4b5b4187896cf4aa23cd8ac66ae2cab/src/dns.cpp#L91
No need for an additional argument :)
It just needs to be overloaded to receive const __FlashStringHelper*
instead of const uint8_t*
, like this:
The overloaded begin method would just need to read the uint8_t array from flash to a temporary buffer in the stack/RAM and call the regular const uint8_t*
method. It's also possible to avoid the temporary array by "copy pasting" the regular method and changing the memcpy
call to a loop reading from flash :)
I could implemented it, but I have no setup to test it at the moment.
Better solution is in #398
This example doesn't work when mac is placed to flash (using nano v3 with old bootloader)