Skip to content

Commit 4213c61

Browse files
committed
TARGET_NRF: added a description of the recent change in spi_init().
1 parent 678f3f9 commit 4213c61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ void spi_init(spi_t *obj,
254254
PinName mosi, PinName miso, PinName sclk, PinName ssel)
255255
{
256256
int i;
257+
258+
// This block is only a workaround that allows to create SPI object several
259+
// times, what would be otherwise impossible in the current implementation
260+
// of mbed driver that does not call spi_free() from SPI destructor.
261+
// Once this mbed's imperfection is corrected, this block should be removed.
257262
for (i = 0; i < SPI_COUNT; ++i) {
258263
spi_info_t *p_spi_info = &m_spi_info[i];
259264
if (p_spi_info->initialized &&

0 commit comments

Comments
 (0)