Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cleanup method for SpiController #10

Open
aseemjakhar opened this issue Jul 26, 2018 · 0 comments
Open

Add a cleanup method for SpiController #10

aseemjakhar opened this issue Jul 26, 2018 · 0 comments

Comments

@aseemjakhar
Copy link

First of all thank you for publishing pyspiflash. I'm using it for my project https://gitlab.com/expliot_framework/expliot

I was not able to find a cleanup method in serialflash.py for the SpiController. If there is already one, it would help of you can point me to the code.
My program will run continuously and needs to close the ftdi interface after each operation. Right now I'm doing it in my code:
def close(device):
if device:
device._spi._controller.terminate()
It would be nice to have a clean way to do it instead of using "_members" directly.
If you want I can send a merge request with similar code as above in SerialFlashManager or preferably _SpiFlashDevice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant