From 6d39f6563d358280a15097e578ec9387ac78612f Mon Sep 17 00:00:00 2001 From: EricB-ADI Date: Wed, 21 Aug 2024 15:07:00 -0500 Subject: [PATCH] Revert "revert(PeriphDrivers): Revert incorrect spi_num - reqselTx/Rx matching in DMA-based SPI transactions for MAX32655, MAX32662, MAX32680, MAX78000, and MAX78002 (#1072)" This reverts commit 713cf987d68bce492673e04b9e907dcef7d397fe. --- Libraries/PeriphDrivers/Source/SPI/spi_ai87.c | 16 ++++++++-------- Libraries/PeriphDrivers/Source/SPI/spi_me12.c | 8 ++++---- Libraries/PeriphDrivers/Source/SPI/spi_me17.c | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_ai87.c b/Libraries/PeriphDrivers/Source/SPI/spi_ai87.c index 3105f9c729d..4fc6a866343 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_ai87.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_ai87.c @@ -405,13 +405,13 @@ int MXC_SPI_MasterTransactionDMA(mxc_spi_req_t *req) switch (spi_num) { case 0: - reqselTx = MXC_DMA_REQUEST_SPI1TX; - reqselRx = MXC_DMA_REQUEST_SPI1RX; + reqselTx = MXC_DMA_REQUEST_SPI0TX; + reqselRx = MXC_DMA_REQUEST_SPI0RX; break; case 1: - reqselTx = MXC_DMA_REQUEST_SPI0TX; - reqselRx = MXC_DMA_REQUEST_SPI0RX; + reqselTx = MXC_DMA_REQUEST_SPI1TX; + reqselRx = MXC_DMA_REQUEST_SPI1RX; break; default: @@ -444,13 +444,13 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req) switch (spi_num) { case 0: - reqselTx = MXC_DMA_REQUEST_SPI1TX; - reqselRx = MXC_DMA_REQUEST_SPI1RX; + reqselTx = MXC_DMA_REQUEST_SPI0TX; + reqselRx = MXC_DMA_REQUEST_SPI0RX; break; case 1: - reqselTx = MXC_DMA_REQUEST_SPI0TX; - reqselRx = MXC_DMA_REQUEST_SPI0RX; + reqselTx = MXC_DMA_REQUEST_SPI1TX; + reqselRx = MXC_DMA_REQUEST_SPI1RX; break; default: diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_me12.c b/Libraries/PeriphDrivers/Source/SPI/spi_me12.c index be7dbc52546..762d8913081 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_me12.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_me12.c @@ -400,13 +400,13 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req) switch (spi_num) { case 0: - reqselTx = MXC_DMA_REQUEST_SPI1TX; - reqselRx = MXC_DMA_REQUEST_SPI1RX; + reqselTx = MXC_DMA_REQUEST_SPI0TX; + reqselRx = MXC_DMA_REQUEST_SPI0RX; break; case 1: - reqselTx = MXC_DMA_REQUEST_SPI0TX; - reqselRx = MXC_DMA_REQUEST_SPI0RX; + reqselTx = MXC_DMA_REQUEST_SPI1TX; + reqselRx = MXC_DMA_REQUEST_SPI1RX; break; default: diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_me17.c b/Libraries/PeriphDrivers/Source/SPI/spi_me17.c index a796c3155d4..2260bcb0d19 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_me17.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_me17.c @@ -419,13 +419,13 @@ int MXC_SPI_MasterTransactionDMA(mxc_spi_req_t *req) switch (spi_num) { case 0: - reqselTx = MXC_DMA_REQUEST_SPI1TX; - reqselRx = MXC_DMA_REQUEST_SPI1RX; + reqselTx = MXC_DMA_REQUEST_SPI0TX; + reqselRx = MXC_DMA_REQUEST_SPI0RX; break; case 1: - reqselTx = MXC_DMA_REQUEST_SPI0TX; - reqselRx = MXC_DMA_REQUEST_SPI0RX; + reqselTx = MXC_DMA_REQUEST_SPI1TX; + reqselRx = MXC_DMA_REQUEST_SPI1RX; break; default: @@ -458,13 +458,13 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req) switch (spi_num) { case 0: - reqselTx = MXC_DMA_REQUEST_SPI1TX; - reqselRx = MXC_DMA_REQUEST_SPI1RX; + reqselTx = MXC_DMA_REQUEST_SPI0TX; + reqselRx = MXC_DMA_REQUEST_SPI0RX; break; case 1: - reqselTx = MXC_DMA_REQUEST_SPI0TX; - reqselRx = MXC_DMA_REQUEST_SPI0RX; + reqselTx = MXC_DMA_REQUEST_SPI1TX; + reqselRx = MXC_DMA_REQUEST_SPI1RX; break; default: