Skip to content

Commit 02f0eb8

Browse files
author
zhen.guo
committed
SecureData 不支持 EC600S, len,lenth changeto length
1 parent 4e50305 commit 02f0eb8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11182,7 +11182,7 @@ $GNGSA,A,3,31,3
1118211182

1118311183
Module function: the module provides a bare flash area and a special read-write interface for customers to store important information, and the information will not be lost after burning the firmware (burning the firmware without this function cannot be guaranteed not to be lost). Provide a storage and read interface, not a delete interface.
1118411184

11185-
At present, only ec600n and ec600s series projects are supported
11185+
At present, only ec600n series projects are supported
1118611186

1118711187
##### Data storage
1118811188

@@ -11234,10 +11234,10 @@ databuf = '\x31\x32\x33\x34\x35\x36\x37\x38'
1123411234
SecureData.Store(1, databuf, 8)
1123511235
#Define an array with a length of 20 to read the stored data
1123611236
buf = bytearray(20)
11237-
#Read the data in the storage area with index 1 into buf, and store the length of the read data in the variable len
11238-
lenth = SecureData.Read(1, buf, 20)
11237+
#Read the data in the storage area with index 1 into buf, and store the length of the read data in the variable length
11238+
length = SecureData.Read(1, buf, 20)
1123911239
#Output read data
11240-
print(buf[:lenth])
11240+
print(buf[:length])
1124111241
```
1124211242

1124311243
* implementation results
@@ -11248,8 +11248,8 @@ print(buf[:lenth])
1124811248
>>> SecureData.Store(1, databuf, 8)
1124911249
0
1125011250
>>> buf = bytearray(20)
11251-
>>> lenth = SecureData.Read(1, buf, 20)
11252-
>>> print(buf[:lenth])
11251+
>>> length = SecureData.Read(1, buf, 20)
11252+
>>> print(buf[:length])
1125311253
bytearray(b'12345678')
1125411254
>>>
1125511255
```

zh-cn/api/QuecPythonClasslib.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11595,7 +11595,7 @@ $GNGSA,A,3,31,3
1159511595
#### SecureData - 安全数据区
1159611596

1159711597
模块功能:模组提供一块裸flash区域及专门的读写接口供客户存贮重要信息,且信息在烧录固件后不丢失(烧录不包含此功能的固件无法保证不丢失)。提供一个存储和读取接口,不提供删除接口。
11598-
目前只支持EC600NEC600S系列项目
11598+
目前只支持EC600N系列项目
1159911599

1160011600
##### 数据存储
1160111601

@@ -11647,10 +11647,10 @@ databuf = '\x31\x32\x33\x34\x35\x36\x37\x38'
1164711647
SecureData.Store(1, databuf, 8)
1164811648
# 定义一个长度为20的数组用于读取存储的数据
1164911649
buf = bytearray(20)
11650-
# 读取index为1的存储区域中的数据至buf中,将读取到数据的长度存储在变量len中
11651-
lenth = SecureData.Read(1, buf, 20)
11650+
# 读取index为1的存储区域中的数据至buf中,将读取到数据的长度存储在变量length中
11651+
length = SecureData.Read(1, buf, 20)
1165211652
# 输出读到的数据
11653-
print(buf[:lenth])
11653+
print(buf[:length])
1165411654
```
1165511655

1165611656
* 执行结果
@@ -11661,8 +11661,8 @@ print(buf[:lenth])
1166111661
>>> SecureData.Store(1, databuf, 8)
1166211662
0
1166311663
>>> buf = bytearray(20)
11664-
>>> lenth = SecureData.Read(1, buf, 20)
11665-
>>> print(buf[:lenth])
11664+
>>> length = SecureData.Read(1, buf, 20)
11665+
>>> print(buf[:length])
1166611666
bytearray(b'12345678')
1166711667
>>>
1166811668
```

0 commit comments

Comments
 (0)