URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [sw/] [lib/] [source/] [neorv32_spi.c] - Diff between revs 12 and 23
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 12 |
Rev 23 |
Line 149... |
Line 149... |
while((SPI_CT & (1<<SPI_CT_BUSY)) != 0); // wait for current transfer to finish
|
while((SPI_CT & (1<<SPI_CT_BUSY)) != 0); // wait for current transfer to finish
|
|
|
return SPI_DATA;
|
return SPI_DATA;
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
|
|
|
/**********************************************************************//**
|
|
* Check if SPI transceiver is busy.
|
|
*
|
|
* @note This function is blocking.
|
|
*
|
|
* @return 0 if idle, 1 if busy
|
|
**************************************************************************/
|
|
int neorv32_spi_busy(void) {
|
|
|
|
if ((SPI_CT & (1<<SPI_CT_BUSY)) != 0) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.