Closed dgnuff closed 10 months ago
Hi @dgnuff :wave:
It should be possible to pass the TX FIFO into emulate()
via the optional initial_state
parameter. For example:
from collections import deque
from pioemu import emulate, State
initial_state = State(transmit_fifo=deque([1, 2, 3]))
opcodes = [0x80a0, 0x6060]
for before, after in emulate(opcodes, initial_state=initial_state, stop_when=...):
pass # etc.
However, if this doesn't work for you please let me know.
That works - thanks for the help.
Closing this issue.
Thanks @dgnuff. If you find this mechanism doesn't scale to your needs then please just raise another issue!
Title pretty much says it all. I've looked at the two documents I can find, the Quick start guide, and the Tour, and neither of them say anything about how to specify the contents of the TX Fifo prior to starting execution. I know it's supported, otherwise the OUT instruction would not be able to work properly.