Skip to content

Commit 2bc140e

Browse files
committed
MIMXRT1050_EVK: Update SPI HAL driver
Use a different SDK API to write to the SPI Bus Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 9135418 commit 2bc140e

File tree

1 file changed

+1
-7
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX

1 file changed

+1
-7
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,9 @@ static inline int spi_readable(spi_t * obj)
107107

108108
int spi_master_write(spi_t *obj, int value)
109109
{
110-
lpspi_transfer_t masterXfer;
111110
uint32_t rx_data;
112111

113-
masterXfer.txData = (uint8_t *)&value;
114-
masterXfer.rxData = NULL;
115-
masterXfer.dataSize = 1;
116-
masterXfer.configFlags = kLPSPI_MasterPcs0 | kLPSPI_MasterPcsContinuous | kLPSPI_SlaveByteSwap;
117-
118-
LPSPI_MasterTransferBlocking(spi_address[obj->instance], &masterXfer);
112+
LPSPI_WriteData(spi_address[obj->instance], value);
119113

120114
// wait rx buffer full
121115
while (!spi_readable(obj));

0 commit comments

Comments
 (0)