if `MY_NODE_ID` is not AUTO
-
if (MY_NODE_ID != AUTO) { // Set static id _nc.nodeId = MY_NODE_ID; // Save static id in eeprom hwWriteConfig(EEPROM_NODE_ID_ADDRESS, MY_NODE_ID); }In the
stInitTransitionfunction,ifMY_NODE_IDis not AUTO,the code will write eeprom one time.if the node reset because some mistakes,It's to bad for the eeprom.Isn't it? -
It will only write to EEPROM if the value differs from the one already stored. So no, this won't affect EEPROM.
-
hwWriteConfig == eeprom_update_byte
See doc:
http://www.nongnu.org/avr-libc/user-manual/group__avr__eeprom.htmlupdate reads before writing
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login