-
• #2
Most probably you have some mix of your patched code, this part is not upstream at all, the only occurrence is here https://github.com/espruino/Espruino/blob/25648d5fc9c586e7a3271e944e5e3b3fb9bfd74b/targets/nrf5x/jshardware.c#L2458 and it allows to recover when some other code pulls CS high but that 'other code' is not there at all. This part is also not lcd_spi_unbuf specific, it is a minimal fix that allows sharing same spi with flash and anything else (like accelerometer on DK08)
here https://gist.github.com/fanoush/627200137d8199c993d6c54901c1c819 is patch with @jeffmer 's changes of
lcd_spi_unbuf
that worked for me, all that is not in upstream Espruino -
• #3
Thank you sir. I thought I'd pulled from the latest, but clearly I did not. Thanks for the patch!
-
• #4
Hi, Gordon rightly thought that switching between HW and SW SPI was a bit of a hack and that a more elegant solution would be to see if SPIFLASH code could use HW SPI when sharing SPI was necessary . I did not get round to looking at that and as @fanoush mentions, the HW/SW hack is not in the main Espruino repository.
I see a lot of @jeffmer 's code which allows sharing of SPI clock and data has made it into lcd_spi_unbuf. However, when I try to compile using SPIFLASH_SHARED_SPI, I get this error:
and when reading this message from jeffmer it looks like that function is not in targets/nrf5x/jshardware.c in the main branch. I'll try to add it from his repo, but curious if it is actually somewhere else? Has anyone used this feature in the main branch?