12 #define ALLOCATED_BUFFER_BIT ((uint8)(1<<0))
13 #define FIFO_FULL_BIT ((uint8)(1<<7))
14 #define FIFO_FULL_CLR_MASK ((uint8)~FIFO_FULL_BIT)
35 if ( bufferCapacity != 0 )
37 pData =_lwmem_alloc_system_zero(bufferCapacity * sampleSize);
71 return isf_fifo_init ( pFifo, NULL, sampleSize, bufferCapacity );
116 if ( currentSize == newSizeInBytes)
return ISF_SUCCESS;
121 pFifo->
pDataBuffer =_lwmem_alloc_system_zero(newSizeInBytes);
unsigned char uint8
This defines uint8 as unsigned char.
#define ALLOCATED_BUFFER_BIT
isf_fifo_status_t isf_fifo_resize(isf_fifo_t *pFifo, uint16 newCapacity)
Routine to change the supported fifo depth.
#define ISF_FIFO_ERR_NO_MEM
#define ISF_FIFO_ERR_USER_BUF
uint16 isf_fifo_get_buffer_size(isf_fifo_t *pFifo)
Routine to query the current fifo buffer size (bytes)
isf_fifo_status_t isf_fifo_data_copy(isf_fifo_t *pFifo, void *samplePtr)
Routine to copy the whole sample buffer.
isf_fifo_status_t isf_fifo_init(isf_fifo_t *pFifo, void *pData, uint16 sampleSize, uint16 bufferCapacity)
Initializes a new fifo structure with a provided buffer.
isf_fifo_status_t isf_fifo_lock(isf_fifo_t *pFifo)
Lock a sample buffer for exclusive access.
#define FIFO_FULL_CLR_MASK
isf_fifo_status_t isf_fifo_free(isf_fifo_t *pFifo)
free a fifo's sample buffer.
isf_fifo_status_t isf_fifo_try_lock(isf_fifo_t *pFifo)
Attempt to lock a sample buffer for exclusive access.
isf_fifo_status_t isf_fifo_el_clear(isf_fifo_t *pFifo)
Routine to clear the fifo.
void * isf_fifo_el_get_insert_pointer(isf_fifo_t *pFifo)
Routine returns the insert pointer for direct access.
The isf_util.h file contains the utility method declarations and macros.
void isf_mem_copy(void *src, void *dest, uint32 size)
memory copy
#define ISF_FIFO_ERR_NO_INIT
#define ISF_FIFO_ERR_BUSY
Main ISF header file. Contains code common to all ISF components.
isf_fifo_status_t isf_fifo_unlock(isf_fifo_t *pFifo)
Release the exclusive access lock on a sample buffer.
isf_fifo_status_t isf_fifo_el_traverse(isf_fifo_t *pFifo, void **pSamplePtr)
Routine to traverse a fifo To initiate the traversal set pSamplePtr to NULL. The function will set th...
unsigned short uint16
This defines uint16 as unsigned short.
#define ISF_FIFO_ERR_INVALID_PTR
isf_fifo_status_t isf_fifo_alloc(isf_fifo_t *pFifo, uint16 sampleSize, uint16 bufferCapacity)
Convenience function to initialize a fifo structure and allocate a new fifo buffer.
#define ISF_FIFO_NO_MORE_ENTRIES
isf_fifo_status_t isf_fifo_el_increment(isf_fifo_t *pFifo)
Routine increments the insert pointer after direct access.