50 #include <adi_processor.h> 51 #include <rtos_map/adi_rtos_map.h> 52 #include <drivers/dma/adi_dma.h> 53 #include <adi_callback.h> 71 #define ADI_SPORT_MEMORY_SIZE (76u + ADI_SEM_SIZE) 146 const uint32_t nDevNum,
148 const ADI_SPORT_DIRECTION eDirection,
150 const uint32_t nMemSize,
151 ADI_SPORT_HANDLE *
const phDevice
156 ADI_SPORT_HANDLE
const hDevice
161 ADI_SPORT_HANDLE
const hDevice,
162 void *
const pBuffer,
163 uint32_t
const nNumBytes,
169 ADI_SPORT_HANDLE
const hDevice,
170 void **
const ppBuffer,
176 ADI_SPORT_HANDLE
const hDevice,
177 bool *
const pbAvailable
182 ADI_SPORT_HANDLE
const hDevice,
183 const ADI_CALLBACK pfCallback,
184 void *
const pCBparam
189 ADI_SPORT_HANDLE
const hDevice,
190 const uint8_t nWordLength,
191 const ADI_SPORT_PACKING_MODE ePackMode,
197 ADI_SPORT_HANDLE
const hDevice,
198 const uint16_t nClockRatio,
199 const bool bUseIntlClock,
200 const bool bRisingEdge,
206 ADI_SPORT_HANDLE
const hDevice,
207 const uint16_t nFsDivisor,
208 const bool bFSRequired,
209 const bool bInternalFS,
211 const bool bActiveLowFS,
213 const bool bFSErrorOperation
218 ADI_SPORT_HANDLE
const hDevice,
219 const bool bUseOtherFS,
220 const bool bUseOtherClk
225 ADI_SPORT_HANDLE
const hDevice,
226 const uint8_t nFSDuration,
227 const uint8_t nWidth,
228 const bool bActiveLow
ADI_SPORT_RESULT adi_sport_MultiplexSportSignal(ADI_SPORT_HANDLE const hDevice, const bool bUseOtherFS, const bool bUseOtherClk)
Configure the SPORT use the Clocks and Frame Sync of other Half-Sport.
ADI_SPORT_RESULT adi_sport_ConfigData(ADI_SPORT_HANDLE const hDevice, const uint8_t nWordLength, const ADI_SPORT_PACKING_MODE ePackMode, const bool bLSBFirst)
Sets data format for the specified SPORT device.
ADI_SPORT_RESULT adi_sport_SubmitBuffer(ADI_SPORT_HANDLE const hDevice, void *const pBuffer, uint32_t const nNumBytes, bool const bDMA)
Submit the buffer for transmitting/receiving the data. This function can be used to submit the buffer...
ADI_SPORT_RESULT adi_sport_ConfigTimerMode(ADI_SPORT_HANDLE const hDevice, const uint8_t nFSDuration, const uint8_t nWidth, const bool bActiveLow)
Configure the SPORT use the Clocks and Frame Sync of other Half-Sport.
ADI_SPORT_RESULT adi_sport_Close(ADI_SPORT_HANDLE const hDevice)
Closes the operation of specified SPORT device.
ADI_SPORT_RESULT adi_sport_ConfigClock(ADI_SPORT_HANDLE const hDevice, const uint16_t nClockRatio, const bool bUseIntlClock, const bool bRisingEdge, const bool bGatedClk)
Configure the clock for the specified SPORT device.
ADI_SPORT_RESULT adi_sport_IsBufferAvailable(ADI_SPORT_HANDLE const hDevice, bool *const pbAvailable)
Peek function to know whether an empty/filled buffer is available. Call to this function is valid onl...
ADI_SPORT_RESULT adi_sport_Open(const uint32_t nDevNum, const ADI_SPORT_CHANNEL eChannel, const ADI_SPORT_DIRECTION eDirection, void *pMemory, const uint32_t nMemSize, ADI_SPORT_HANDLE *const phDevice)
Initialization function for SPORT device.
ADI_SPORT_RESULT adi_sport_RegisterCallback(ADI_SPORT_HANDLE const hDevice, const ADI_CALLBACK pfCallback, void *const pCBparam)
Register and unregister a Callback function with the SPORT device driver. A registered call back func...
ADI_SPORT_RESULT adi_sport_GetBuffer(ADI_SPORT_HANDLE const hDevice, void **const ppBuffer, uint32_t *pHwError)
This function returns the address of a processed buffer. This is a blocking function: it waits until ...
ADI_SPORT_RESULT adi_sport_ConfigFrameSync(ADI_SPORT_HANDLE const hDevice, const uint16_t nFsDivisor, const bool bFSRequired, const bool bInternalFS, const bool bDataFS, const bool bActiveLowFS, const bool bLateFS, const bool bFSErrorOperation)
Frame Sync(FS) configuration for the specified SPORT.