Open danielkucera opened 6 years ago
There might be but is it worth? This solution is cleaner IMHO.
Thanks for submitting this PR. Like @jordens I am concerned about the code duplication. What is this solution cleaner than?
@danielkucera ping
@jordens what ping? I don't understand the bitbang code and with bitbang enabled, the code was failing. So I added an assert. Take it, leave it or explain the code.
@danielkucera The line you refer to does exactly what you are doing (take miso for 1-wide SPI) just in bitbang mode. The bigbang code is originally by @fallen but has gone through a few hands.
@jordens , I've read it about 50 times but still I don't understand. Moreover I cannot test the code in 2,4-bit mode because I don't have such hardware so I'd rather not do any additional changes to the code.
as suggested in https://github.com/m-labs/misoc/issues/87