Move background task check

This commit is contained in:
gamblor21 2023-03-06 16:26:22 -06:00
parent dd05118645
commit 7f5f93126c
1 changed files with 1 additions and 2 deletions

View File

@ -262,10 +262,9 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self,
for (int i = 0; i < cur_trans; i++) { for (int i = 0; i < cur_trans; i++) {
spi_device_queue_trans(spi_handle[self->host_id], &transactions[i], portMAX_DELAY); spi_device_queue_trans(spi_handle[self->host_id], &transactions[i], portMAX_DELAY);
RUN_BACKGROUND_TASKS;
} }
RUN_BACKGROUND_TASKS;
spi_transaction_t *rtrans; spi_transaction_t *rtrans;
for (int x = 0; x < cur_trans; x++) { for (int x = 0; x < cur_trans; x++) {
spi_device_get_trans_result(spi_handle[self->host_id], &rtrans, portMAX_DELAY); spi_device_get_trans_result(spi_handle[self->host_id], &rtrans, portMAX_DELAY);