Skip to content

Commit

Permalink
Merge pull request #2768 from particle-iot/fix/sc126409/rtl872x_spi
Browse files Browse the repository at this point in the history
[RTL872x] multiple SPI fixes
  • Loading branch information
XuGuohui committed May 21, 2024
2 parents 84afa3a + 31b2c5c commit 350260b
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 223 deletions.
2 changes: 1 addition & 1 deletion hal/src/nRF52840/spi_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static void spiSlaveEventHandler(nrfx_spis_evt_t const * p_event, void * p_conte
return;
}

spiMap[spi].transfer_length = p_event->rx_amount;
spiMap[spi].transfer_length = std::max(p_event->rx_amount, p_event->tx_amount);
spiMap[spi].transmitting = false;

// We should notify application, despite of how many data we received.
Expand Down
Loading

0 comments on commit 350260b

Please sign in to comment.