2022-04-23 00:03:20 +08:00
|
|
|
import PikaStdLib
|
2021-12-13 21:24:48 +08:00
|
|
|
import PikaStdData
|
2022-04-25 13:24:23 +08:00
|
|
|
import ctypes
|
2022-01-24 19:08:33 +08:00
|
|
|
import GTestTask
|
2021-10-11 19:43:21 +08:00
|
|
|
import PikaMath
|
2022-04-07 09:19:14 +08:00
|
|
|
import PikaStdDevice
|
2022-05-07 19:51:52 +08:00
|
|
|
# import test_module1
|
2022-04-23 00:03:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-25 13:24:23 +08:00
|
|
|
|
|
|
|
mem = PikaStdLib.MemChecker()
|
|
|
|
|
|
|
|
num = 10
|
|
|
|
c = str(num)
|
|
|
|
s = "num = " + c
|
|
|
|
print(s)
|
|
|
|
|
|
|
|
cnt = 0
|
|
|
|
while cnt < 3:
|
2022-04-28 15:53:09 +08:00
|
|
|
rlen = ctypes.c_uint(0)
|
|
|
|
rcvbuf = ctypes.c_wchar_p('')
|
|
|
|
t = ctypes.Test()
|
|
|
|
sendbuf = b'\x00\x84\x00\x00\x08'
|
|
|
|
i = 0
|
|
|
|
while i < 3 :
|
|
|
|
|
|
|
|
t.dc_cpuapdu_hex(5, sendbuf, rlen, rcvbuf)
|
|
|
|
t.print_rcv(rcvbuf)
|
|
|
|
i += 1
|
2022-04-25 13:24:23 +08:00
|
|
|
print('----------------------')
|
|
|
|
log = 'loop '+ str(cnt) + 'mem use max:'
|
|
|
|
print(log)
|
|
|
|
mem.max()
|
|
|
|
print('----------------------')
|
|
|
|
cnt += 1
|
2022-04-23 00:03:20 +08:00
|
|
|
|
|
|
|
print('mem use max:')
|
2022-04-25 13:24:23 +08:00
|
|
|
mem.max()
|