Fix issue #109, SPI needs to read register SPI_USER(SPI_NO) instead o…#110
Fix issue #109, SPI needs to read register SPI_USER(SPI_NO) instead o…#110mtavenrath wants to merge 1 commit intoSmingHub:masterfrom
Conversation
|
@harry-boe Can you check if this fix also works with the SDCard library? I think this fix is better than initializing mySettings._user_regvalue with the value of mySettings._user_regvalue = SPI_USER(SPI_NO); The alternate fix I haven't tried yet would be reading the register SPI_USER(SPI_NO) instead of using the value SPI_USER(SPI_NO) though I don't see why this is more useful unless we want to restore the original value in endTransaction. |
|
It might work that way but it will break wit the idea to preserve the register for multiple SPI clients with different Settings (i.e. Register Values) |
004cfa5 to
0c87357
Compare
…nstead of using the value SPI_USER(SPI_NO) as base value for SPI_USER in SPI::transfer and SPI::transfer32
|
The code now preserves the user register in beginTransaction and restores it in endTransaction. |
|
From the logic side this should work as well. |
…f using the value SPI_USER(SPI_NO) as base value for SPI_USER in SPI::transfer and SPI::transfer32