dhs.h

来自「SEED的VPM642测试程序-板级支持库」· C头文件 代码 · 共 59 行

H
59
字号
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DSP/BIOS 4.90.270 12-18-03 (barracuda-o04)" */
/*
 *  ======== dhs.h ========
 *  Host-Link driver header.
 *
 *  This driver is used for streaming data between the host and the DSP,
 *  using an underlying HST object.
 *
 */

#ifndef DHS_
#define DHS_

#include <dev.h>
#include <sem.h>
#include <hst.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
 *  DHS Object and Handle.  This device uses an HST object with an underlying
 *  PIP object, for streaming data between the DSP and the host.
 *  The "notify" function for this HST object is DHS_interrupt.
 *
 */
typedef struct DHS_Obj {
    /*
     *  Flag set to TRUE after first DHS_io operation for input device.
     *  This is to ensure we don't call PIP_free() before the first PIP_get().
     */
    Bool	started;	/* Make PIP_free() happen before PIP_get() */

    SEM_Obj	pipreadySem;	/* Count > 0 if frame available in pipe. */
    Int		fromdevCnt;	/* Number of frames on fromdevice queue */
    HST_Obj	*hst;		/* Underlying HST object */
    SEM_Handle  ready;          /* Temporary semaphore used by DHS_ready() */
    DEV_Handle  device;         /* Device handle - to get at queues */
} DHS_Obj, *DHS_Handle;


extern DEV_Fxns DHS_FXNS;

extern Void DHS_interrupt(DHS_Obj *dhs);

#ifdef __cplusplus
}
#endif /* extern "C" */

#endif /* DHS_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?