add Kasli-SoC POR control program

This commit is contained in:
Sebastien Bourdeauducq 2021-05-29 17:43:21 +08:00
parent f83ef218de
commit 759bf95a76
1 changed files with 17 additions and 0 deletions

17
kasli_soc_por.py Normal file
View File

@ -0,0 +1,17 @@
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()