Merge pull request #7904 from NXPmicro/MIMXRT1050_Fix_Spi

MIMXRT1050_EVK: Update SPI HAL driver
pull/8005/head
Cruz Monrreal 2018-09-05 09:18:58 -05:00 committed by GitHub
commit dc45990a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));