Make it work with Python 3 and BusPirate#1
Open
lkundrak wants to merge 5 commits intoklirichek:masterfrom
Open
Make it work with Python 3 and BusPirate#1lkundrak wants to merge 5 commits intoklirichek:masterfrom
lkundrak wants to merge 5 commits intoklirichek:masterfrom
Conversation
This is wrong. Perhaps Python 2 was a little more forgiving so this didn't cause an exception.
Not as good as Perl, but generally more available than Python 2 nowadays.
This 512K chip is on a Book8088's LCD driver board.
Let's parse the option first, before accessing the I2C bus. This will allow us to choose between different I2C backends. Besides that, there's absolutely no need to catch GetoptError exceptions for anything other than call to getopt().
Add support for programming via BusPirate using the pyBusPirateLite library. The backend is negotiated automatically, BusPirate silently fallen back to if the smbus backend doesn't work. The --backend option allows explicitly choosing the backend, which is useful for getting a traceback in case of a failure instead of the silent fallback. $ time python pyprog.py -w sad-and-broken.bin Can't use SMBUS backend (use --backend=smbus to force it anyway), attempting BusPirate... Using BusPirate backend (assuming --backend=buspirate) JEDEC ID: 0x856013 Manufacturer PUYA Chip: P25Q40 Size: 512KB Setup chip commands for Winbond... Flash status register: 0x0 Erasing... done Flashing sad-and-broken.bin Will write 512Kb Writting addr 6800 ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This made the tool so much more useful to me that I had to tell all my friends and some enemies too.