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

📄 csl_mcbsp.h

📁 Dm6455 driver,magbe useful to you!
💻 H
📖 第 1 页 / 共 4 页
字号:
 * for XMT and RCV
 */
typedef enum {
    /** Disable the both XMT and RCV IO mode */
    CSL_MCBSP_IOMODE_TXDIS_RXDIS       =                  0,
    /** Disable XMT and enable RCV IO mode */
    CSL_MCBSP_IOMODE_TXDIS_RXEN        =                  1,
    /** Enable XMT and Disble RCV IO mode */
    CSL_MCBSP_IOMODE_TXEN_RXDIS        =                  2,
    /** Enable XMT and enable RCV IO mode */
    CSL_MCBSP_IOMODE_TXEN_RXEN         =                  3
} CSL_McbspIOMode;
  
/** 
 * Clock Stop Mode - Use this symbol to Enable/Disable Clock Stop Mode
 */
typedef enum {
    /** Disable the clock stop mode */
    CSL_MCBSP_CLKSTP_DISABLE       =                  0,
    /** Emable the clock stop mode  with out delay */
    CSL_MCBSP_CLKSTP_WITHOUT_DELAY =                  2,
    /** Emable the clock stop mode  with delay */
    CSL_MCBSP_CLKSTP_WITH_DELAY    =                  3
} CSL_McbspClkStp;

/**
 * Multichannel mode Partition type - Use this symbol to select the partition
 * type in multichannel mode
 */
typedef enum {
    /** two partition mode */
    CSL_MCBSP_PARTMODE_2PARTITION           =                  0,
    /** Eight partition multichannel mode */
    CSL_MCBSP_PARTMODE_8PARTITION           =                  1
} CSL_McbspPartMode;

/**
 * Multichannel mode PartitionA block - Use this symbol to assign Blocks to 
 * Partition-A in multichannel mode
 */
typedef enum {
    /** Block 0 for partition A */
    CSL_MCBSP_PABLK_0              =                  0,
    /** Block 2 for partition A */
    CSL_MCBSP_PABLK_2              =                  1,
    /** Block 4 for partition A */
    CSL_MCBSP_PABLK_4              =                  2,
    /** Block 6 for partition A */
    CSL_MCBSP_PABLK_6              =                  3
} CSL_McbspPABlk;

/**
 * Multichannel mode PartitionB block - Use this symbol to assign Blocks to 
 * Partition-B in multichannel mode
 */
typedef enum {
    /** Block 1 for partition B */
    CSL_MCBSP_PBBLK_1              =                  0,
    /** Block 3 for partition B */
    CSL_MCBSP_PBBLK_3              =                  1,
    /** Block 5 for partition B */
    CSL_MCBSP_PBBLK_5              =                  2,
    /** Block 7 for partition B */
    CSL_MCBSP_PBBLK_7              =                  3
} CSL_McbspPBBlk;

/**
 * Emulation mode setting - Use this symbol to set the Emulation Mode
 */
typedef enum {
    /** Emulation mode stop */
    CSL_MCBSP_EMU_STOP             =                  0,
    /** Emulation mode TX stop */
    CSL_MCBSP_EMU_TX_STOP          =                  1,
    /** Emulation free run mode */
    CSL_MCBSP_EMU_FREERUN          =                  2
} CSL_McbspEmu;

/**
 * Multichannel mode Partition select - Use this symbol in multichannel mode to 
 * select the Partition for assigning a block to
 */
typedef enum {
    /** TX partition for A */
    CSL_MCBSP_PARTITION_ATX        =                  0,
    /** RX partition for A */
    CSL_MCBSP_PARTITION_ARX        =                  1,
    /** TX partition for B */
    CSL_MCBSP_PARTITION_BTX        =                  2,
    /** RX partition for B */
    CSL_MCBSP_PARTITION_BRX        =                  3
} CSL_McbspPartition;

/**
 * Multichannel mode Block select - Use this symbol in multichannel mode to
 * select block on which the operation is to be performed
 */
typedef enum {
    /** Block 0 for multichannel mode */
    CSL_MCBSP_BLOCK_0               =                  0,
    /** Block 1 for multichannel mode */
    CSL_MCBSP_BLOCK_1               =                  1,
    /** Block 2 for multichannel mode */
    CSL_MCBSP_BLOCK_2               =                  2,
    /** Block 3 for multichannel mode */
    CSL_MCBSP_BLOCK_3               =                  3,
    /** Block 4 for multichannel mode */
    CSL_MCBSP_BLOCK_4               =                  4,
    /** Block 5 for multichannel mode */
    CSL_MCBSP_BLOCK_5               =                  5,
    /** Block 6 for multichannel mode */
    CSL_MCBSP_BLOCK_6               =                  6,
    /** Block 7 for multichannel mode */
    CSL_MCBSP_BLOCK_7               =                  7
} CSL_McbspBlock;

/**
 * Channel control in multichannel mode
 * Use this symbol to enable/disable a channel in multichannel mode.
 * This is a member of CSL_McbspChanControl structure, which is input to
 * CSL_mcbspHwControl() function for CSL_MCBSP_CMD_CHANNEL_CONTROL command
 */
typedef enum {
    /** TX enable for multichannel mode */
    CSL_MCBSP_CHCTRL_TX_ENABLE       =                  0,
    /** TX disable for multichannel mode */
    CSL_MCBSP_CHCTRL_TX_DISABLE      =                  1,
    /** RX enable for multichannel mode */
    CSL_MCBSP_CHCTRL_RX_ENABLE       =                  2,
    /** RX disable for multichannel mode */
    CSL_MCBSP_CHCTRL_RX_DISABLE      =                  3
} CSL_McbspChCtrl;

/**
 * Channel type: TX, RX or both - Use this symbol to select the channel type for 
 * CSL_mcbspHwControl()
 */
typedef enum {
    /** Channel type is RX */
    CSL_MCBSP_CHTYPE_RX                   =             1,
    /** Channel type is TX */
    CSL_MCBSP_CHTYPE_TX                   =             2,
    /** Channel type is TXRX */
    CSL_MCBSP_CHTYPE_TXRX                 =             4
} CSL_McbspChType;

/**
 * Digital Loopback mode selection - Use this symbol to enable/disable digital
 * loopback mode
 */
typedef enum {
    /** disable digital loopback mode */
    CSL_MCBSP_DLBMODE_OFF                  =            0,
    /** enable digital loopback mode */
    CSL_MCBSP_DLBMODE_ON                   =            1
} CSL_McbspDlbMode;

/**
 * Phase count selection - Use this symbol to select number of phases per frame
 */
typedef enum {
    /** Single phase for frame */
    CSL_MCBSP_PHASE_SINGLE                =             0,
    /** Dual phase for frame */
    CSL_MCBSP_PHASE_DUAL                  =             1
} CSL_McbspPhase;

/**
 * Frame sync ignore status - Use this symbol to detect or ignore 
 * frame synchronisation
 */
typedef enum {
    /** detect frame synchronisation */
    CSL_MCBSP_FRMSYNC_DETECT                  =         0,
    /** ignore frame synchronisation */
    CSL_MCBSP_FRMSYNC_IGNORE                  =         1
} CSL_McbspFrmSync;

/**
 * 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;

/**
 * CLKG sync mode selection - Use this symbol to enable/disable CLKG 
 * synchronisation when input CLK source for SRGR is external
 */
typedef enum {
    /** disable CLKG synchronisation */
    CSL_MCBSP_CLKGSYNCMODE_OFF                 =        0,
    /** enable CLKG synchronisation */
    CSL_MCBSP_CLKGSYNCMODE_ON                  =        1
} CSL_McbspClkgSyncMode;

/**
 * Tx/Rx reset status - Use this symbol to compare the output of 
 * CSL_mcbspGetHwStatus() for CSL_MCBSP_QUERY_TX_RST_STAT and 
 * CSL_MCBSP_QUERY_RX_RST_STAT queries
 */
typedef enum {
    /** disable the XRST bit */
    CSL_MCBSP_RSTSTAT_TX_IN_RESET             =         0,
    /** disable the RRST bit */
    CSL_MCBSP_RSTSTAT_RX_IN_RESET             =         0,
    /** enable the XRST bit */
    CSL_MCBSP_RSTSTAT_TX_OUTOF_RESET          =         1,
    /** enable the RRST bit */
    CSL_MCBSP_RSTSTAT_RX_OUTOF_RESET          =         1
} CSL_McbspRstStat;

/** McBSP 32-bit reversal feature */
typedef enum {
    /** 32-bit reversal disabled */
    CSL_MCBSP_32BIT_REVERS_DISABLE  = 0,
    /** 32-bit reversal enabled. 32-bit data is received LSB first. Word length
     *  should be set for 32-bit operation; else operation undefined
     */
    CSL_MCBSP_32BIT_REVERS_ENABLE    = 1 
} CSL_McbspBitReversal;

/**
 * This is the set of control commands that are passed to
 * CSL_mcbspHwControl(), with an optional argument type-casted to void*
 * The arguments, if any, to be passed with each command are specified
 * next to that command.
 */
typedef enum {
        /**
         * @brief   Assigns a block to a particular partition in multichannel 
         *          mode
         * @param   (CSL_McbspBlkAssign *)
         */
    CSL_MCBSP_CMD_ASSIGN_BLOCK     =                  0,
        /**
         * @brief   Enables or disables a channel in multichannel mode
         * @param   (CSL_McbspChanControl *)
         */
    CSL_MCBSP_CMD_CHANNEL_CONTROL  =                  1,
        /**
         * @brief   Clears frame sync error for XMT or RCV
         * @param   (CSL_McbspChType *)
         */
    CSL_MCBSP_CMD_CLEAR_FRAME_SYNC =                  2,
        /**
         * @brief   Resets all the registers to their power-on default values
         * @param   None
         */
    CSL_MCBSP_CMD_RESET        =                      3,
        /**
         * @brief   Enable/Disable - Frame Sync, Sample Rate Generator and 
         *          XMT/RCV Operation
         * @param   (CSL_BitMask16 *)
         */
    CSL_MCBSP_CMD_RESET_CONTROL    =                  4
} CSL_McbspControlCmd;

/**
 * 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 {
        /**
         * @brief   Queries the current XMT block
         * @param   (CSL_McbspBlock *)
         */
        CSL_MCBSP_QUERY_CUR_TX_BLK =                 1,
        /**
         * @brief   Queries the current RCV block
         * @param   (CSL_McbspBlock *)
         */
    CSL_MCBSP_QUERY_CUR_RX_BLK =                     2,
        /**
         * @brief   Queries the status of RRDY, XRDY, RFULL, XEMPTY, RSYNCERR
         *          and XSYNCERR events and returns them in supplied 
         *          CSL_BitMask16 argument
         * @param  (CSL_BitMask16 *)
         */
    CSL_MCBSP_QUERY_DEV_STATUS =                     3,
        /**
         * @brief   Queries XMT reset status
         * @param   (CSL_McbspRstStat *)
         * @return CSL_SOK
         */
    CSL_MCBSP_QUERY_TX_RST_STAT =                    4,
        /**
         * @brief   Queries RCV reset status
         * @param  (CSL_McbspRstStat *)
         */
    CSL_MCBSP_QUERY_RX_RST_STAT =                    5
} CSL_McbspHwStatusQuery;

/**
 * This will have the base-address information for the peripheral instance
 */
typedef struct {
    /** Base-address of the Configuration registers of MCBSP  */
    CSL_McbspRegsOvly regs;
} CSL_McbspBaseAddress;

/**
 *  MCBSP specific parameters. Present implementation doesn't have
 *  any specific parameters.
 */
typedef struct {
    /** Bit mask to be used for module specific parameters.
     *  The below declaration is just a place-holder for future
     *  implementation.
     */
    CSL_BitMask16   flags;
} CSL_McbspParam;

/**
 *  MCBSP specific context information. Present implementation doesn't
 *  have any Context information.
 */

typedef struct {
    /** Context information of MCBSP.
     *  The below declaration is just a place-holder for future
     *  implementation.
     */
    Uint16  contextInfo;
} CSL_McbspContext;

/**
 * Pointer to this structure is used as the third argument in
 * 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;

/**
 * Pointer to this structure is used as the third argument in
 * 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;

/**
 * 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          numPhases;
   
    /** 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;

⌨️ 快捷键说明

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