(ql)
| 62 | return current_milli_time |
| 63 | |
| 64 | def devprg_tx_blocking(ql): |
| 65 | ptr = ql.arch.regs.x0 |
| 66 | plen = ql.arch.regs.x1 |
| 67 | data = ql.mem.read(ptr, plen) |
| 68 | res=bytes(data) |
| 69 | if b"response" in res: |
| 70 | tmp=res.decode('utf-8').split("\n") |
| 71 | if len(tmp)>2: |
| 72 | tmp=tmp[2].split("\"") |
| 73 | if len(tmp)>1: |
| 74 | ql.buf_out=tmp[1] |
| 75 | return 0 |
| 76 | |
| 77 | ql.hook_mem_invalid(hook_mem_invalid) |
| 78 | replace_function(ql, 0x148595A0, devprg_time_usec) # Register 0xC221000 |