MIMXRT1050_EVK: Update SPI HAL driver

Use a different SDK API to write to the SPI Bus

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
pull/7904/head
Mahesh Mahadevan 2018-08-27 13:42:26 -05:00
parent 91354184dc
commit 2bc140e978
1 changed files with 1 additions and 7 deletions

View File

@ -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));