F
fl
Hi,
I find the following definition from a company provided header file. The sample application software still uses FIR16, not *FIR16_handle.
The typedef line really puzzles me. Could you explain it to me? It would be better to give a small example.
Thanks,
typedef struct {
long *coeff_ptr; /* Pointer to Filter coefficient */
long * dbuffer_ptr; /* Delay buffer ptr */
int cbindex; /* Circular Buffer Index */
int order; /* Order of the Filter */
int input; /* Latest Input sample */
int output; /* Filter Output */
void (*init)(void *); /* Ptr to Init funtion */
void (*calc)(void *); /* Ptr to calc fn */
}FIR16;
/*---------------------------------------------------------------
Define a Handles for the Filter Modules
-----------------------------------------------------------------*/
typedef FIR16 *FIR16_handle;
I find the following definition from a company provided header file. The sample application software still uses FIR16, not *FIR16_handle.
The typedef line really puzzles me. Could you explain it to me? It would be better to give a small example.
Thanks,
typedef struct {
long *coeff_ptr; /* Pointer to Filter coefficient */
long * dbuffer_ptr; /* Delay buffer ptr */
int cbindex; /* Circular Buffer Index */
int order; /* Order of the Filter */
int input; /* Latest Input sample */
int output; /* Filter Output */
void (*init)(void *); /* Ptr to Init funtion */
void (*calc)(void *); /* Ptr to calc fn */
}FIR16;
/*---------------------------------------------------------------
Define a Handles for the Filter Modules
-----------------------------------------------------------------*/
typedef FIR16 *FIR16_handle;