Result of NutNetIfConfig2

Holger Mai <[email protected]> Wed, 20 Apr 2016 11:44:03 +0200 (CEST)
Newsgroups gmane.comp.hardware.microcontrollers.ethernut
Message-ID <949183049.11837.a61b5840-f468-46ee-af02-b78af94592f9.open-xchange@email.1und1.de>
if no NVMEM is configured for NutOS, then NutNetIfConfig2() and/or
NutNetIfSetup() returns with a fail as result, even if the network configuration
by itself was successful. That is because the (about NutNetSaveConfig) called
NutNvMemSave() returns -1 if no NVMEM is selected in configurator.
This Return should be changed to 0

nvmem.h:
...
 #elif defined(NUT_CONFIG_AVR32EFC)
	return Avr32FlashcParamWrite( addr, buff, len);
 #else
-    return -1;
+    return 0;
 #endif
}
...

Alternate it would be an option, to give the NutNetIfConfig2() and
NutNetIfSetup() a boolean parameter, who said to call NutNetSaveConfig() or not.
(For better compatibility, functions can be renamed). 
Or create a new function, that sets only a local flag to control the NVMEM usage
(include loading values).    
 

mit freundlichen Grüßen /Best Regards

Holger Mai

[email protected]



GEMAC - Gesellschaft für Mikroelektronik-
anwendung Chemnitz mbH
Zwickauer Straße 227
D-09116 Chemnitz
Tel. +49 371 3377 - 0
Fax +49 371 3377 272
UST-ID: DE140851265
HRB 6443 Chemnitz/Stadt
Geschäftsführer: Dirk Hübner / Karsten Grönwoldt
http://www.gemac-chemnitz.de
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion