From fbfa1aa7fbf8127cc2547f6d78a9e39b774830cd Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Mon, 27 Aug 2018 13:42:26 -0500 Subject: [PATCH] MIMXRT1050_EVK: Update SPI HAL driver Use a different SDK API to write to the SPI Bus Signed-off-by: Mahesh Mahadevan --- .../TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c index 5795639d87..710d813813 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c @@ -107,15 +107,9 @@ static inline int spi_readable(spi_t * obj) int spi_master_write(spi_t *obj, int value) { - lpspi_transfer_t masterXfer; uint32_t rx_data; - masterXfer.txData = (uint8_t *)&value; - masterXfer.rxData = NULL; - masterXfer.dataSize = 1; - masterXfer.configFlags = kLPSPI_MasterPcs0 | kLPSPI_MasterPcsContinuous | kLPSPI_SlaveByteSwap; - - LPSPI_MasterTransferBlocking(spi_address[obj->instance], &masterXfer); + LPSPI_WriteData(spi_address[obj->instance], value); // wait rx buffer full while (!spi_readable(obj));