forked from M-Labs/zynq-rs
1
0
Fork 0
zynq-rs/kasli_soc_por.py

18 lines
345 B
Python
Raw Permalink Normal View History

2021-05-29 17:43:21 +08:00
from time import sleep
from pyftdi.ftdi import Ftdi
POR = 1 << 7
def main():
dev = Ftdi()
dev.open_bitbang_from_url("ftdi://ftdi:4232h/0")
dev.set_bitmode(POR, Ftdi.BitMode.BITBANG)
dev.write_data(bytes([0]))
sleep(0.1)
dev.write_data(bytes([POR]))
sleep(0.1)
dev.close()
if __name__ == "__main__":
main()