mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
Merge branch 'feature/nvs_partition_util_v3.3' into 'release/v3.3'
Add support to include comments in csv file (backport v3.3) See merge request idf/esp-idf!4670
This commit is contained in:
@ -752,7 +752,7 @@ def nvs_part_gen(input_filename=None, output_filename=None, input_part_size=None
|
|||||||
output_file = open(output_filename, 'wb')
|
output_file = open(output_filename, 'wb')
|
||||||
|
|
||||||
with nvs_open(output_file, input_size) as nvs_obj:
|
with nvs_open(output_file, input_size) as nvs_obj:
|
||||||
reader = csv.DictReader(input_file, delimiter=',')
|
reader = csv.DictReader(filter(lambda row: row[0] != '#',input_file), delimiter=',')
|
||||||
for row in reader:
|
for row in reader:
|
||||||
try:
|
try:
|
||||||
write_entry(nvs_obj, row["key"], row["type"], row["encoding"], row["value"])
|
write_entry(nvs_obj, row["key"], row["type"], row["encoding"], row["value"])
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# Sample csv file
|
||||||
key,type,encoding,value
|
key,type,encoding,value
|
||||||
dummyNamespace,namespace,,
|
dummyNamespace,namespace,,
|
||||||
dummyU8Key,data,u8,127
|
dummyU8Key,data,u8,127
|
||||||
|
|
@ -1,3 +1,4 @@
|
|||||||
|
# Sample csv file
|
||||||
key,type,encoding,value
|
key,type,encoding,value
|
||||||
dummyNamespace,namespace,,
|
dummyNamespace,namespace,,
|
||||||
dummyU8Key,data,u8,127
|
dummyU8Key,data,u8,127
|
||||||
|
|
Reference in New Issue
Block a user