Skip to content

Commit 4d6816e

Browse files
author
oclyke
committed
comment out AM_HAL_IOM_FULLDUPLEX usage
The full duplex direction enumeration was removed in SDK 2.4.2. Need to find out if this functionality is still supported or not.
1 parent 2289708 commit 4d6816e

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

libraries/SPI/src/SPI.cpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,13 @@ void SPIClass::_transfer(void *buf_out, void *buf_in, size_t count)
291291
iomTransfer.pui32TxBuffer = (uint32_t *)buf_out; // todo: does this have the proper lifetime?
292292
iomTransfer.pui32RxBuffer = (uint32_t *)buf_in;
293293

294-
// Determine direction
295-
if ((buf_out != NULL) && (buf_in != NULL))
296-
{
297-
iomTransfer.eDirection = AM_HAL_IOM_FULLDUPLEX;
298-
}
299-
else if (buf_out != NULL)
294+
// // Determine direction
295+
// if ((buf_out != NULL) && (buf_in != NULL))
296+
// {
297+
// iomTransfer.eDirection = AM_HAL_IOM_FULLDUPLEX;
298+
// }
299+
// else
300+
if (buf_out != NULL)
300301
{
301302
iomTransfer.eDirection = AM_HAL_IOM_TX;
302303
}
@@ -306,14 +307,14 @@ void SPIClass::_transfer(void *buf_out, void *buf_in, size_t count)
306307
}
307308

308309
uint32_t retVal32 = 0;
309-
if (iomTransfer.eDirection == AM_HAL_IOM_FULLDUPLEX)
310-
{
311-
retVal32 = am_hal_iom_spi_blocking_fullduplex(_handle, &iomTransfer);
312-
}
313-
else
314-
{
310+
// if (iomTransfer.eDirection == AM_HAL_IOM_FULLDUPLEX)
311+
// {
312+
// retVal32 = am_hal_iom_spi_blocking_fullduplex(_handle, &iomTransfer);
313+
// }
314+
// else
315+
// {
315316
retVal32 = am_hal_iom_blocking_transfer(_handle, &iomTransfer);
316-
}
317+
// }
317318

318319
// if (retVal32 != 0)
319320
// {

0 commit comments

Comments
 (0)