Add NVS key for username and password
Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
@@ -42,6 +42,8 @@ enum nconfig_type
|
|||||||
VIN_CURRENT_LIMIT, ///< The maximum current limit for the VIN.
|
VIN_CURRENT_LIMIT, ///< The maximum current limit for the VIN.
|
||||||
MAIN_CURRENT_LIMIT, ///< The maximum current limit for the MAIN out.
|
MAIN_CURRENT_LIMIT, ///< The maximum current limit for the MAIN out.
|
||||||
USB_CURRENT_LIMIT, ///< The maximum current limit for the USB out.
|
USB_CURRENT_LIMIT, ///< The maximum current limit for the USB out.
|
||||||
|
PAGE_USERNAME, ///< Webpage username
|
||||||
|
PAGE_PASSWORD, ///< Webpage password
|
||||||
NCONFIG_TYPE_MAX, ///< Sentinel for the maximum number of configuration types.
|
NCONFIG_TYPE_MAX, ///< Sentinel for the maximum number of configuration types.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ const static char* keys[NCONFIG_TYPE_MAX] = {
|
|||||||
[VIN_CURRENT_LIMIT] = "vin_climit",
|
[VIN_CURRENT_LIMIT] = "vin_climit",
|
||||||
[MAIN_CURRENT_LIMIT] = "main_climit",
|
[MAIN_CURRENT_LIMIT] = "main_climit",
|
||||||
[USB_CURRENT_LIMIT] = "usb_climit",
|
[USB_CURRENT_LIMIT] = "usb_climit",
|
||||||
|
[PAGE_USERNAME] = "username",
|
||||||
|
[PAGE_PASSWORD] = "password",
|
||||||
};
|
};
|
||||||
|
|
||||||
struct default_value
|
struct default_value
|
||||||
@@ -50,6 +52,8 @@ struct default_value const default_values[] = {
|
|||||||
{VIN_CURRENT_LIMIT, "4.0"},
|
{VIN_CURRENT_LIMIT, "4.0"},
|
||||||
{MAIN_CURRENT_LIMIT, "3.0"},
|
{MAIN_CURRENT_LIMIT, "3.0"},
|
||||||
{USB_CURRENT_LIMIT, "3.0"},
|
{USB_CURRENT_LIMIT, "3.0"},
|
||||||
|
{PAGE_USERNAME, "admin"},
|
||||||
|
{PAGE_PASSWORD, "password"},
|
||||||
};
|
};
|
||||||
|
|
||||||
esp_err_t init_nconfig()
|
esp_err_t init_nconfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user