[En-Nut-Discussion] Result of NutNetIfConfig2

Holger Mai mai at gemac.info
Wed Apr 20 11:44:03 CEST 2016


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

mai at gemac-chemnitz.de



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


More information about the En-Nut-Discussion mailing list