49 #include <adi_processor.h> 50 #include <rtos_map/adi_rtos_map.h> 51 #include <adi_spi_config.h> 58 #include <adi_spi_config.h> 59 #include <adi_callback.h> 72 #define ADI_SPI_MEMORY_SIZE (40u + ADI_SEM_SIZE) 274 uint32_t nMemorySize,
275 ADI_SPI_HANDLE*
const phDevice
279 ADI_SPI_HANDLE
const hDevice
287 ADI_SPI_HANDLE
const hDevice,
293 ADI_SPI_CONST_HANDLE
const hDevice,
299 ADI_SPI_HANDLE
const hDevice,
305 ADI_SPI_HANDLE
const hDevice,
310 ADI_SPI_HANDLE
const hDevice,
316 ADI_SPI_HANDLE
const hDevice,
317 ADI_CALLBACK
const pfCallback,
324 ADI_SPI_HANDLE
const hDevice,
325 uint32_t *
const pHWErrors
330 ADI_SPI_HANDLE
const hDevice,
335 ADI_SPI_HANDLE
const hDevice,
341 ADI_SPI_CONST_HANDLE
const hDevice,
342 bool*
const bComplete
348 ADI_SPI_CONST_HANDLE
const hDevice,
354 ADI_SPI_CONST_HANDLE
const hDevice,
359 ADI_SPI_CONST_HANDLE
const hDevice,
360 const uint8_t nMode);
363 ADI_SPI_CONST_HANDLE
const hDevice,
368 ADI_SPI_CONST_HANDLE
const hDevice,
374 ADI_SPI_CONST_HANDLE
const hDevice,
378 ADI_SPI_HANDLE
const hDevice,
383 ADI_SPI_CONST_HANDLE
const hDevice,
384 uint32_t*
const pnBitrate
ADI_SPI_RESULT adi_spi_SetTransmitUnderflow(ADI_SPI_CONST_HANDLE const hDevice, const bool bFlag)
Set the SPI transmit FIFO underflow mode.
ADI_SPI_RESULT adi_spi_GetBuffer(ADI_SPI_HANDLE const hDevice, uint32_t *const pHWErrors)
Block until the SPI transaction is complete.
ADI_SPI_RESULT adi_spi_SlaveReadWrite(ADI_SPI_HANDLE const hDevice, const ADI_SPI_TRANSCEIVER *const pXfr)
Submit data buffers for SPI Slave-Mode transaction in "Blocking mode".This function returns only af...
uint16_t TransmitterBytes
ADI_SPI_RESULT adi_spi_SetClockPhase(ADI_SPI_HANDLE const hDevice, const bool bFlag)
Set the clock phase.
ADI_SPI_RESULT adi_spi_SetContinuousMode(ADI_SPI_CONST_HANDLE const hDevice, const bool bFlag)
Set the continuous transfer mode.
ADI_SPI_RESULT adi_spi_Open(uint32_t nDeviceNum, void *pDevMemory, uint32_t nMemorySize, ADI_SPI_HANDLE *const phDevice)
Initialize and allocate an SPI device for use in Master Mode.
ADI_SPI_RESULT adi_spi_Close(ADI_SPI_HANDLE const hDevice)
Uninitialize and deallocate an SPI device.
ADI_SPI_RESULT adi_spi_isBufferAvailable(ADI_SPI_CONST_HANDLE const hDevice, bool *const bComplete)
Get the SPI transaction completion status.
ADI_SPI_RESULT adi_spi_SetChipSelect(ADI_SPI_HANDLE const hDevice, const ADI_SPI_CHIP_SELECT eChipSelect)
Set the chip select.
ADI_SPI_RESULT adi_spi_SetLoopback(ADI_SPI_CONST_HANDLE const hDevice, const bool bFlag)
Set the internal loopback mode.
ADI_SPI_RESULT adi_spi_GetBitrate(ADI_SPI_CONST_HANDLE const hDevice, uint32_t *const pnBitrate)
Get the SPI serial clock frequency.
ADI_SPI_RESULT adi_spi_RegisterCallback(ADI_SPI_HANDLE const hDevice, ADI_CALLBACK const pfCallback, void *const pCBParam)
Register or unregister the callback.
ADI_SPI_RESULT adi_spi_SetClockPolarity(ADI_SPI_HANDLE const hDevice, const bool bFlag)
Set the clock polarity.
ADI_SPI_RESULT adi_spi_SetIrqmode(ADI_SPI_CONST_HANDLE const hDevice, const uint8_t nMode)
Set the IRQ mode.
ADI_SPI_RESULT adi_spi_SetReceiveOverflow(ADI_SPI_CONST_HANDLE const hDevice, const bool bFlag)
Set the SPI receive FIFO overflow mode.
ADI_SPI_RESULT adi_spi_MasterReadWrite(ADI_SPI_HANDLE const hDevice, const ADI_SPI_TRANSCEIVER *const pXfr)
Submit data buffers for SPI Master-Mode transaction in "Blocking mode".This function returns only a...
struct __ADI_SPI_DEV_DATA_TYPE * ADI_SPI_HANDLE
ADI_SPI_RESULT adi_spi_SetMasterMode(ADI_SPI_CONST_HANDLE const hDevice, const bool bFlag)
Set SPI Master-Mode operation.
const struct __ADI_SPI_DEV_DATA_TYPE * ADI_SPI_CONST_HANDLE
ADI_SPI_RESULT adi_spi_SlaveSubmitBuffer(ADI_SPI_HANDLE const hDevice, const ADI_SPI_TRANSCEIVER *const pXfr)
Submit data buffers for SPI Slave-Mode transaction.
ADI_SPI_RESULT adi_spi_SetBitrate(ADI_SPI_CONST_HANDLE const hDevice, const uint32_t Hertz)
Set the SPI serial clock frequency.
ADI_SPI_RESULT adi_spi_MasterSubmitBuffer(ADI_SPI_HANDLE const hDevice, const ADI_SPI_TRANSCEIVER *const pXfr)
Submit data buffers for SPI Master-Mode transaction.