13#ifndef CDI_FIFO_API_H__
14#define CDI_FIFO_API_H__
104 void* item_dest_ptr);
124 const void* item_ptr);
This file declares the public API data types, structures and functions that comprise the CDI low-leve...
void * CdiUserCbParameter
Type used as user defined data that is passed to the registered user RX/TX callback functions.
Definition cdi_core_api.h:182
This file contains the declarations for OS functions for creating/managing/freeing threads,...
struct CdiSignalType_t * CdiSignalType
Define portable signal type. Don't use void* here, which prevents the compiler from type checking.
Definition cdi_os_api.h:189
#define CDI_INTERFACE
Specify C linkage when compiling as C++ and define API interface export for Windows.
Definition cdi_utility_api.h:34
void(* CdiFifoCallback)(const CdiFifoCbData *data_ptr)
Prototype of FIFO debug callback function.
Definition fifo_api.h:69
CDI_INTERFACE const char * CdiFifoGetName(CdiFifoHandle handle)
Definition fifo.c:274
void(* CdiFifoFullCallback)(const CdiFifoFullCbData *cb_data_ptr)
Prototype of FIFO write callback function. It is invoked whenever CdiFifoWrite() is used to write to ...
Definition fifo_api.h:49
CDI_INTERFACE bool CdiFifoWrite(CdiFifoHandle handle, int timeout_ms, CdiSignalType abort_wait_signal, const void *item_ptr)
Definition fifo.c:192
CDI_INTERFACE void CdiFifoDestroy(CdiFifoHandle handle)
Definition fifo.c:301
CDI_INTERFACE void CdiFifoFlush(CdiFifoHandle handle)
Definition fifo.c:124
CDI_INTERFACE bool CdiFifoCreate(const char *name_str, int item_count, int item_byte_size, CdiFifoFullCallback full_cb_ptr, CdiUserCbParameter full_user_cb_param, CdiFifoHandle *ret_handle_ptr)
Definition fifo.c:65
CDI_INTERFACE bool CdiFifoRead(CdiFifoHandle handle, int timeout_ms, CdiSignalType abort_wait_signal, void *item_dest_ptr)
Definition fifo.c:132
struct CdiFifoState * CdiFifoHandle
Type used as the handle (pointer to an opaque structure) for a FIFO. Each handle represents a instanc...
Definition fifo_api.h:30
A structure of this type is passed as the parameter to CdiFifoCallback(). It contains the state of a ...
Definition fifo_api.h:55
bool is_read
True if FIFO read triggered the callback, otherwise a FIFO write triggered it.
Definition fifo_api.h:56
void * item_data_ptr
Pointer to item data.
Definition fifo_api.h:59
int tail_index
Current tail index position in FIFO.
Definition fifo_api.h:58
int head_index
Current head index position in FIFO.
Definition fifo_api.h:57
A structure of this type is passed as the parameter to CdiFifoFullCallback().
Definition fifo_api.h:35
const void * new_item_data_ptr
Pointer to item trying to be written to FIFO.
Definition fifo_api.h:38
void * tail_item_data_ptr
Pointer to current tail data item in FIFO.
Definition fifo_api.h:40
void * head_item_data_ptr
Pointer to current head data item in FIFO.
Definition fifo_api.h:39
CdiFifoHandle fifo_handle
FIFO handle.
Definition fifo_api.h:36
CdiUserCbParameter fifo_user_cb_param
User defined callback parameter.
Definition fifo_api.h:37
Structure used to hold state data for a single FIFO.
Definition fifo.c:32