Skip to content

Commit 65072f1

Browse files
committed
There's no longer a need to register the SPI callback, since we are not using interrupts for the SPI driver.
1 parent 0cc34e0 commit 65072f1

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

libraries/SPI/SPI.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void ArduinoSPI::begin()
102102
_cb_event_idx = _channel;
103103

104104
_spi_cfg.p_extend = &_spi_ext_cfg;
105-
_spi_cfg.p_callback = spi_callback;
105+
_spi_cfg.p_callback = nullptr;
106106
}
107107

108108
/* SPI configuration for SPI HAL driver. */
@@ -547,19 +547,6 @@ std::tuple<spi_clk_phase_t, spi_clk_polarity_t, spi_bit_order_t> ArduinoSPI::toF
547547
* CALLBACKS FOR FSP FRAMEWORK
548548
**************************************************************************************/
549549

550-
void spi_callback(spi_callback_args_t *p_args)
551-
{
552-
if (SPI_EVENT_TRANSFER_COMPLETE == p_args->event)
553-
{
554-
_spi_cb_event[p_args->channel] = SPI_EVENT_TRANSFER_COMPLETE;
555-
}
556-
else
557-
{
558-
/* Updating the flag here to capture and handle all other error events */
559-
_spi_cb_event[p_args->channel] = SPI_EVENT_TRANSFER_ABORTED;
560-
}
561-
}
562-
563550
void sci_spi_callback(spi_callback_args_t *p_args)
564551
{
565552
int const spi_master_offset = SPI_MAX_SPI_CHANNELS;

0 commit comments

Comments
 (0)