libmain: add a compile option to avoid saving wifi params to flash
Add source code for sdk_wifi_param_save_protect() and a compile time, WIFI_PARAM_SAVE, option to skip writing the wifi state to flash. This avoids wear on the flash and does not appear to be necessary when the app initializes the state anyway. Define WIFI_PARAM_SAVE to 0 for the wificfg example.
This commit is contained in:
parent
f89ba44f6e
commit
7a8ee567b6
2 changed files with 56 additions and 3 deletions
|
@ -3,10 +3,13 @@ PROGRAM=wificfg
|
|||
EXTRA_COMPONENTS=extras/dhcpserver extras/wificfg
|
||||
|
||||
# For the mDNS responder included under extras:
|
||||
# EXTRA_COMPONENTS+=extras/mdnsresponder
|
||||
# EXTRA_CFLAGS=-DEXTRAS_MDNS_RESPONDER
|
||||
# EXTRA_COMPONENTS += extras/mdnsresponder
|
||||
# EXTRA_CFLAGS += -DEXTRAS_MDNS_RESPONDER
|
||||
|
||||
# For the mDNS responder included with lwip:
|
||||
EXTRA_CFLAGS=-DLWIP_MDNS_RESPONDER=1 -DLWIP_NUM_NETIF_CLIENT_DATA=1 -DLWIP_NETIF_EXT_STATUS_CALLBACK=1
|
||||
EXTRA_CFLAGS += -DLWIP_MDNS_RESPONDER=1 -DLWIP_NUM_NETIF_CLIENT_DATA=1 -DLWIP_NETIF_EXT_STATUS_CALLBACK=1
|
||||
|
||||
# Avoid writing the wifi state to flash when using wificfg.
|
||||
EXTRA_CFLAGS += -DWIFI_PARAM_SAVE=0
|
||||
|
||||
include ../../common.mk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue