⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plio.h

📁 CHP 4 - Real-Time Digital Signal Processing: Implementations and Applications, Second Edition by Sen
💻 H
字号:
/*
 *  Copyright 2002 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.
 *  
 */
/* "@(#) ReferenceFrameworks 1.10.00 04-30-02 (swat-b21)" */

/*
 *  ======== plio.h ========
 * 
 *  Header file for plio.c, which allows a PIP to interface to an
 *  LIO. As implemented only one LIO driver may be used, and may only be
 *  used with a single input and single output channel. You may modify
 *  this code to enable more channels and drivers.
 *
 *  See the comments below for how to configure a DSP/BIOS application
 *  which uses this code.
 */
//
//  Tools used: CCS v.2.12.07
//              TMS320VC5510 DSK Rev-C
//

#ifndef PLIO_
#define PLIO_

#include <pip.h>

#include <lio.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct PLIO_Attrs {
    String name;
    Ptr openArgs;
} PLIO_Attrs;

extern PLIO_Attrs PLIO_ATTRS;   // default PLIO_Attrs structure

typedef struct PLIO_Obj
{
    Uns         submitCount;    // keep track of frames submitted
    Uns         submitLimit;    // max frames controller can accept

    LIO_Fxns    *fxns;          // PLIO interface functions

    PIP_Curdesc *curdesc;       // used to access pipe on submit side
    PIP_Handle  pip;            // pointer to associated pipe

    Ptr         controller;     // pointer to device-specific state object
} PLIO_Obj, *PLIO_Handle;

/*
 * PLIO_ctrl() passes parameters straight through to the controller
 */
#define PLIO_ctrl(plio, cmd, args) \
        (plio)->fxns->ctrl((plio)->controller, cmd, args)
/*
 *  PLIO module initialization   
 */
extern Void PLIO_init(Void);

/*
 * PLIO_new() must be called to initialize the I/O prior to any
 * transfers occuring. Pass in the pointer to the PLIO object and pointer
 * to PIP object to associate with that channel. The last argument is for
 * various attributes including a generic argument to be passed to LIO 
 * open, it may be NULL. You would typically call PLIO_new() from main.
 */
extern Void PLIO_new(
    PLIO_Handle plio, PIP_Handle pip, LIO_Mode mode, LIO_Fxns *fxns,
    PLIO_Attrs *attrs
);

/*
 *  PLIO_txPrime should be configured as the writer notify
 *  function for output pipes.
 *  PLIO_rxPrime should be configured as the reader notify
 *  function of input pipes.
 */
extern Void PLIO_rxPrime(PLIO_Handle plio);
extern Void PLIO_rxStart (PLIO_Handle plio, Uns frameCount);
extern Void PLIO_txPrime(PLIO_Handle plio);
extern Void PLIO_txStart (PLIO_Handle plio, Uns frameCount, Uns initialValue);

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

#endif /* PLIO_ */


⌨️ 快捷键说明

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