Add software reset example for the mta1 programmer

This commit is contained in:
Matthew Mets 2022-10-24 16:05:00 +01:00 committed by Daniel Lublin
parent 517fafff57
commit 48f32949bc
No known key found for this signature in database
GPG Key ID: 75BD0FEB8D3E7830

View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import hid_test
import time
def reset_mta1():
""" Manipulate the GPIO lines on the MTA1-USB-CH552 Programmer to issue a hardware reset to the MTA1 """
d = hid_test.ice40_flasher()
d.gpio_set_direction(14, True)
d.gpio_put(14, False)
d.gpio_set_direction(14, False)
d.close()
reset_mta1()