We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f940443 + 2bc140e commit dc45990Copy full SHA for dc45990
targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/spi_api.c
@@ -107,15 +107,9 @@ static inline int spi_readable(spi_t * obj)
107
108
int spi_master_write(spi_t *obj, int value)
109
{
110
- lpspi_transfer_t masterXfer;
111
uint32_t rx_data;
112
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);
+ LPSPI_WriteData(spi_address[obj->instance], value);
119
120
// wait rx buffer full
121
while (!spi_readable(obj));
0 commit comments