From 6fdfb9db1face33c2b764e31fa7351320e7ac122 Mon Sep 17 00:00:00 2001 From: avram-pycom Date: Thu, 27 May 2021 14:24:50 +0300 Subject: [PATCH] update description of nvs_get --- content/firmwareapi/pycom/pycom.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/firmwareapi/pycom/pycom.md b/content/firmwareapi/pycom/pycom.md index f295e838..d5dfd556 100644 --- a/content/firmwareapi/pycom/pycom.md +++ b/content/firmwareapi/pycom/pycom.md @@ -33,11 +33,11 @@ Get or set the colour of the RGB LED. The colour is specified as 24 bit value re Set the value of the specified key in the NVRAM memory area of the external flash. Data stored here is preserved across resets and power cycles. Value can only take 32-bit integers at the moment. Example: -### pycom.nvs_get(key) +### pycom.nvs_get(key[, optional_default_value]) -Get the value the specified key from the NVRAM memory area of the external flash. Example: +Get the value with the specified key from the NVRAM memory area of the external flash. -If a non-existing key is given the returned value will be `None`. +If a non-existing key is given the returned value will be the optional_default_value if it is provided, else an error will be raised. The error message for missing key is: "No matching object for the provided key" ### pycom.nvs_erase(key)