csl_mcbsp.h

来自「dsp在音频处理中的运用」· C头文件 代码 · 共 1,398 行 · 第 1/3 页

H
1,398
字号
 * @defgroup CSL_MCBSP_CLKSTP_ENUM Clock Stop Mode * @ingroup CSL_MCBSP_ENUM * * @brief Clock Stop Mode * * Use this symbol to Enable/Disable Clock Stop Mode * @{ */typedef enum {    CSL_MCBSP_CLKSTP_DISABLE       =                  1,    CSL_MCBSP_CLKSTP_WITHOUT_DELAY =                  2,    CSL_MCBSP_CLKSTP_WITH_DELAY    =                  3} CSL_McbspClkStp;/**@} *//** * @defgroup CSL_MCBSP_PARTMODE_ENUM Multichannel mode Partition type * @ingroup CSL_MCBSP_ENUM * * @brief Multichannel mode Partition type * * Use this symbol to select the partition type in multichannel mode * @{ */typedef enum {    CSL_MCBSP_PARTMODE_2PARTITION           =                  0,    CSL_MCBSP_PARTMODE_8PARTITION           =                  1} CSL_McbspPartMode;/**@} *//** * @defgroup CSL_MCBSP_PABLK_ENUM Multichannel mode PartitionA block * @ingroup CSL_MCBSP_ENUM * * @brief Multichannel mode PartitionA block * * Use this symbol to assign Blocks to Partition-A in multichannel mode * @{ */typedef enum {    CSL_MCBSP_PABLK_0              =                  0,    CSL_MCBSP_PABLK_2              =                  1,    CSL_MCBSP_PABLK_4              =                  2,    CSL_MCBSP_PABLK_6              =                  3} CSL_McbspPABlk;/**@} *//** * @defgroup CSL_MCBSP_PBBLK_ENUM Multichannel mode PartitionB block * @ingroup CSL_MCBSP_ENUM * * @brief Multichannel mode PartitionB block * * Use this symbol to assign Blocks to Partition-B in multichannel mode * @{ */typedef enum {    CSL_MCBSP_PBBLK_1              =                  0,    CSL_MCBSP_PBBLK_3              =                  1,    CSL_MCBSP_PBBLK_5              =                  2,    CSL_MCBSP_PBBLK_7              =                  3} CSL_McbspPBBlk;/**@} *//** * @defgroup CSL_MCBSP_EMU_ENUM Emulation mode setting * @ingroup CSL_MCBSP_ENUM * * @brief Emulation mode setting * * Use this symbol to set the Emulation Mode * @{ */typedef enum {    CSL_MCBSP_EMU_STOP             =                  0,    CSL_MCBSP_EMU_TX_STOP          =                  1,    CSL_MCBSP_EMU_FREERUN          =                  2} CSL_McbspEmu;/**@} *//** * @defgroup CSL_MCBSP_PARTITION_ENUM Multichannel mode Partition select * @ingroup CSL_MCBSP_ENUM * * @brief Multichannel mode Partition select * * Use this symbol in multichannel mode to select the Partition * for assigning a block to * @{ */typedef enum {    CSL_MCBSP_PARTITION_ATX        =                  0,    CSL_MCBSP_PARTITION_ARX        =                  1,    CSL_MCBSP_PARTITION_BTX        =                  2,    CSL_MCBSP_PARTITION_BRX        =                  3} CSL_McbspPartition;/**@} *//** * @defgroup CSL_MCBSP_BLOCK_ENUM Multichannel mode Block select * @ingroup CSL_MCBSP_ENUM * * @brief Multichannel mode Block select * * Use this symbol in multichannel mode to select block on which the * operation is to be performed * @{ */typedef enum {    CSL_MCBSP_BLOCK_0               =                  0,    CSL_MCBSP_BLOCK_1               =                  1,    CSL_MCBSP_BLOCK_2               =                  2,    CSL_MCBSP_BLOCK_3               =                  3,    CSL_MCBSP_BLOCK_4               =                  4,    CSL_MCBSP_BLOCK_5               =                  5,    CSL_MCBSP_BLOCK_6               =                  6,    CSL_MCBSP_BLOCK_7               =                  7,    CSL_MCBSP_ODD_BLOCKS            =                  1} CSL_McbspBlock;/**@} */                      /** * @defgroup CSL_MCBSP_CHAN_ENUM Channel control in multichannel mode * @ingroup CSL_MCBSP_ENUM * * @brief Channel control in multichannel mode * * Use this symbol to enable/disable a channel in multichannel mode. * This is a member of @a CSL_McbspChanControl structure, which is input to * @a CSL_mcbspHwControl() function for @a CSL_MCBSP_CMD_CHANNEL_CONTROL command * @{ */typedef enum {    CSL_MCBSP_CHCTRL_TX_ENABLE       =                  0,    CSL_MCBSP_CHCTRL_TX_DISABLE      =                  1,    CSL_MCBSP_CHCTRL_RX_ENABLE       =                  2,    CSL_MCBSP_CHCTRL_RX_DISABLE      =                  3} CSL_McbspChCtrl;/**@} *//** * @defgroup CSL_MCBSP_CHANTYPE_ENUM Channel type: TX, RX or both * @ingroup CSL_MCBSP_ENUM * * @brief Channel type: TX, RX ot both * * Use this symbol to select the channel type for @a CSL_mcbspHwControl() * @a CSL_MCBSP_CMD_CLEAR_FRAME_SYNC command * @{ */typedef enum {    CSL_MCBSP_CHTYPE_RX                   =                  1,    CSL_MCBSP_CHTYPE_TX                   =                  2,    CSL_MCBSP_CHTYPE_TXRX                 =                  4} CSL_McbspChType;/**@} *//** * @defgroup CSL_MCBSP_DLBMODE_ENUM Digital Loopback mode selection * @ingroup CSL_MCBSP_ENUM * * @brief Digital Loopback mode selection * * Use this symbol to enable/disable digital loopback mode * @{ */typedef enum {    CSL_MCBSP_DLBMODE_OFF                  =                  0,    CSL_MCBSP_DLBMODE_ON                   =                  1} CSL_McbspDlbMode;/**@} *//** * @defgroup CSL_MCBSP_PHASE_ENUM Phase count selection * @ingroup CSL_MCBSP_ENUM * * @brief Phase count selection * * Use this symbol to select number of phases per frame * @{ */typedef enum {    CSL_MCBSP_PHASE_SINGLE                =                  0,    CSL_MCBSP_PHASE_DUAL                  =                  1} CSL_McbspPhase;/**@} *//** * @defgroup CSL_MCBSP_FRMSYNC_ENUM Frame sync ignore status * @ingroup CSL_MCBSP_ENUM * * @brief Frame sync ignore status * * Use this symbol to detect or ignore frame synchronisation * @{ */typedef enum {    CSL_MCBSP_FRMSYNC_DETECT                  =                  0,    CSL_MCBSP_FRMSYNC_IGNORE                  =                  1} CSL_McbspFrmSync;/**@} *//** * @defgroup CSL_MCBSP_RJUSTDXENA_ENUM RJUST or DXENA settings * @ingroup CSL_MCBSP_ENUM * * @brief RJUST or DXENA settings * * Use this symbol for setting up RCV sign-extension and justification mode * or enabling/disabling XMT DX pin delay * @{ */typedef enum {    /** RCV setting - right justify, fill MSBs with zeros */    CSL_MCBSP_RJUSTDXENA_RJUST_RZF                 =                  0,    /** XMT setting - Delay at DX pin disabled */    CSL_MCBSP_RJUSTDXENA_DXENA_OFF                 =                  0,    /** RCV setting - right justify, sign-extend the data into MSBs */    CSL_MCBSP_RJUSTDXENA_RJUST_RSE                 =                  1,    /** XMT setting - Delay at DX pin enabled */    CSL_MCBSP_RJUSTDXENA_DXENA_ON                  =                  1,    /** RCV setting - left justify, fill LSBs with zeros */    CSL_MCBSP_RJUSTDXENA_RJUST_LZF                 =                  2} CSL_McbspRjustDxena;/**@} *//** * @defgroup CSL_MCBSP_CLKGSYNCMODE_ENUM CLKG sync mode selection * @ingroup CSL_MCBSP_ENUM * * @brief CLKG sync mode selection * * Use this symbol to enable/disable CLKG synchronisation when * input CLK source for SRGR is external * @{ */typedef enum {    CSL_MCBSP_CLKGSYNCMODE_OFF                 =                  0,    CSL_MCBSP_CLKGSYNCMODE_ON                  =                  1} CSL_McbspClkgSyncMode;/**@} *//** * @defgroup CSL_MCBSP_RSTSTAT_ENUM Tx/Rx reset status * @ingroup CSL_MCBSP_ENUM * * @brief Tx/Rx reset status * * Use this symbol to compare the output of @a CSL_mcbspGetHwStatus() for * @a CSL_MCBSP_QUERY_TX_RST_STAT and @a CSL_MCBSP_QUERY_RX_RST_STAT queries * * @{ */typedef enum {    CSL_MCBSP_RSTSTAT_TX_IN_RESET             =                  0,    CSL_MCBSP_RSTSTAT_RX_IN_RESET             =                  0,    CSL_MCBSP_RSTSTAT_TX_OUTOF_RESET          =                  1,    CSL_MCBSP_RSTSTAT_RX_OUTOF_RESET          =                  1} CSL_McbspRstStat;/**@} *//** * @defgroup CSL_MCBSP_CONTROLCMD_ENUM Control commands * @ingroup CSL_MCBSP_CONTROL_API * @{ *//** * This is the set of control commands that are passed to * @a CSL_mcbspHwControl(), with an optional argument type-casted to @a void* * * The arguments, if any, to be passed with each command are specified * next to that command. */typedef enum {/** * Assigns a block to a particular partition in multichannel mode * * @param (CSL_McbspBlkAssign *) * @return CSL_SOK */    CSL_MCBSP_CMD_ASSIGN_BLOCK     =                  0,/** * Enables or disables a channel in multichannel mode * * @param (CSL_McbspChanControl *) * @return CSL_SOK */    CSL_MCBSP_CMD_CHANNEL_CONTROL  =                  1,/** * Clears frame sync error for XMT or RCV * * @param (CSL_McbspChType *) * @return CSL_SOK */    CSL_MCBSP_CMD_CLEAR_FRAME_SYNC =                  2,/** * Configures selected MCBSP pins for Input/Output * * @param (CSL_McbspIoControl *) * @return CSL_SOK */    CSL_MCBSP_CMD_IO_MODE_CONTROL  =                  3,/** * Resets all the registers to their power-on default values * * @param None * @return CSL_SOK */    CSL_MCBSP_CMD_REG_RESET        =                  4,/** *  Enable/Disable - Frame Sync, Sample Rate Generator and XMT/RCV Operation * * @param (CSL_BitMask16 *) * @return CSL_SOK */    CSL_MCBSP_CMD_RESET_CONTROL    =                  5} CSL_McbspControlCmd;/**@} *//** * @defgroup CSL_MCBSP_QUERYCMD_ENUM Query commands * @ingroup CSL_MCBSP_QUERY_API * @{ *//** * This is the set of query commands to get the status of various * operations in MCBSP * * The arguments, if any, to be passed with each command are specified * next to that command. */typedef enum {/** * Queries the current XMT block * @param  (CSL_McbspBlock *) * @return CSL_SOK */    CSL_MCBSP_QUERY_CUR_TX_BLK =                  6,/** * Queries the current RCV block * @param  (CSL_McbspBlock *) * @return CSL_SOK */    CSL_MCBSP_QUERY_CUR_RX_BLK =                  7,/** * Queries the status of RRDY, XRDY, RFULL, XEMPTY, RSYNCERR and XSYNCERR * and returns to ORed status of them in the 3rd argument of * @a CSL_mcbspGetHwStatus() * * @param  (Uint16 *) * @return CSL_SOK */    CSL_MCBSP_QUERY_DEV_STATUS =                  8,/** * Queries XMT reset status * * @param  (CSL_McbspRstStat *) * @return CSL_SOK */    CSL_MCBSP_QUERY_TX_RST_STAT =                  9,/** * Queries RCV reset status * * @param  (CSL_McbspRstStat *) * @return CSL_SOK */    CSL_MCBSP_QUERY_RX_RST_STAT =                 10} CSL_McbspHwStatusQuery;/**@} */typedef Uint32   CSL_McbspCount;/** @addtogroup CSL_MCBSP_DATASTRUCT** @{ *//** * Pointer to this structure is used as the third argument in * @a CSL_mcbspHwControl() for block assignment in multichannel mode */typedef struct CSL_McbspBlkAssign {    /** Partition to choose */    CSL_McbspPartition      partition;    /** Block to choose */    CSL_McbspBlock          block;} CSL_McbspBlkAssign;/**@} *//** @addtogroup CSL_MCBSP_DATASTRUCT** @{ *//** * Pointer to this structure is used as the third argument in * @a CSL_mcbspHwControl() for channel control operations (Enable/Disable TX/RX) * in multichannel mode */typedef struct CSL_McbspChanControl {    /** Channel number to control */    Uint16              channelNo;    /** Control operation */    CSL_McbspChCtrl  operation;} CSL_McbspChanControl;/**@} *//** @addtogroup CSL_MCBSP_DATASTRUCT** @{ *//** * Pointer to this structure is used as the third argument in * @a CSL_mcbspHwControl() for IO mode control operations (selecting the pins * to use as input and output */typedef struct CSL_McbspIoControl {    /** Pinmask to select one or more output pins */    CSL_BitMask16           outputsel;    /** Pinmask to select one or more input pins */    CSL_BitMask16           inputsel;} CSL_McbspIoControl;/**@} *//* Structure(Internal) used during resource allocation */typedef struct CSL_McbspResAttrs {    CSL_Xio                 xio;    CSL_Uid                 uid;    CSL_McbspRegsOvly       *regs;    Int16               perNum;} CSL_McbspResAttrs;/** @addtogroup CSL_MCBSP_DATASTRUCT** @{ *//** * This is a sub-structure in @ CSL_McbspHwSetup. This structure is used for * configuring input/output data related parameters */typedef struct CSL_McbspDataSetup {    /** Number of phases in a frame */    CSL_McbspPhase              phaseNum;    /** Number of bits per word in phase 1 */    CSL_McbspWordLen     wordLength1;    /** Number of words per frame in phase 1 */    Uint16              frmLength1;    /** Number of bits per word in phase 2 */    CSL_McbspWordLen     wordLength2;    /** Number of words per frame in phase 2 */    Uint16              frmLength2;    /** Frame Sync ignore */    CSL_McbspFrmSync              frmSyncIgn;    /** Companding options */    CSL_McbspCompand        compand;    /** Data delay in number of bits */    CSL_McbspDataDelay      dataDelay;    /** Controls DX delay for XMT or sign-extension and justification for RCV */    CSL_McbspRjustDxena              rjust_dxenable;    /** Interrupt event mask */    CSL_McbspIntMode       IntEvent;} CSL_McbspDataSetup;/**@} *//** @addtogroup CSL_MCBSP_DATASTRUCT** @{ *//** * This is a sub-structure in @a CSL_McbspHwSetup. This structure is used for * configuring Clock and Frame Sync generation parameters */typedef struct CSL_McbspClkSetup {    /** XMT frame sync mode */

⌨️ 快捷键说明

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