Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TARGET_NRF: corrected spi_init() to properly handle re-initialization… #3842
… on the same pins + minor editorial corrections.
Each spi_init() call resulted in initialization of another SPI peripheral instance, whereas a previously used one should be utilized if initialization was done with the same pin assignments. Otherwise, code like tests-api-spi (with local SPI object created several times) has no chance to run correctly, at least unless SPI destructor calls spi_free().
From this standpoint, the existing code is correct and this patch is a workaround for a defect in mbed.