📄 csl_mcbsp.h
字号:
/**< Driven as 1 */
CSL_MCBSP_DX_LOGIC_1 = 1,
/**< Driven as 0 */
CSL_MCBSP_DX_LOGIC_0 = 2
} CSL_McbspDxState;
/**
@} */
/**
* @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,
/**
* Enable/Disable - Idle
*
* @param (CSL_BitMask16 *)
* @return CSL_SOK
* @sa CSL_MCBSP_IDLECTRL_SYMBOL
*/
CSL_MCBSP_CMD_IDLE_CONTROL = 6
} 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 = 1,
/**
* Queries the current RCV block
* @param (CSL_McbspBlock *)
* @return CSL_SOK
*/
CSL_MCBSP_QUERY_CUR_RX_BLK = 2,
/**
* Queries the status of RRDY, XRDY, RFULL, XEMPTY, RSYNCERR and XSYNCERR
* events and returns them in supplied CSL_BitMask16 argument
*
*
* @param (CSL_BitMask16 *)
* @return CSL_SOK
* @see CSL_DEVSTATUS_SYMBOL
*/
CSL_MCBSP_QUERY_DEV_STATUS = 3,
/**
* Queries XMT reset status
*
* @param (CSL_McbspRstStat *)
* @return CSL_SOK
*/
CSL_MCBSP_QUERY_TX_RST_STAT = 4,
/**
* Queries RCV reset status
*
* @param (CSL_McbspRstStat *)
* @return CSL_SOK
*/
CSL_MCBSP_QUERY_RX_RST_STAT = 5,
/**
* Queries Peripheral ID
*
* @param (CSL_McbspPeriId *)
* @return CSL_SOK
*/
CSL_MCBSP_QUERY_PID = 6
} CSL_McbspHwStatusQuery;
/**
@} */
/**
* @brief 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;
/**
* @brief 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;
/**
* @brief 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;
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief 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
*
* @{ */
/**
* @brief 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_mcbspGetHwStatus () for getting revison, type and class info
* of McBSP512 */
typedef struct CSL_McbspPeriId {
Uint16 type; /**< Identifies the Type of peripheral */
Uint16 devclass;/**< Identifies the class of the McBSP512 peripheral */
Uint16 revision; /**< Identifies the revision level of the McBSP512 */
} CSL_McbspPeriId;
/**
@} */
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief 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;
/**
@} */
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief 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;
/** 32-bit reversal feature */
CSL_McbspBitReversal wordReverse;
} CSL_McbspDataSetup;
/**
@} */
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief 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 */
CSL_McbspFsClkMode frmSyncTxMode;
/** RCV frame sync mode */
CSL_McbspFsClkMode frmSyncRxMode;
/** XMT clock mode */
CSL_McbspTxRxClkMode clkTxMode;
/** RCV clock mode */
CSL_McbspTxRxClkMode clkRxMode;
/** XMT frame sync polarity */
CSL_McbspFsPol frmSyncTxPolarity;
/** RCV frame sync polarty */
CSL_McbspFsPol frmSyncRxPolarity;
/** XMT clock polarity */
CSL_McbspClkPol clkTxPolarity;
/** RCV clock polarity */
CSL_McbspClkPol clkRxPolarity;
/** SRG frame sync pulse width */
Uint16 srgFrmPulseWidth;
/** SRG frame sync period */
Uint16 srgFrmPeriod;
/** SRG divide-down ratio */
Uint16 srgClkDivide;
/** SRG input clock mode */
CSL_McbspSrgClk srgInputClkMode;
/** SRG clock polarity */
CSL_McbspClkPol srgClkPolarity;
/** SRG XMT frame-synchronisatoin mode */
CSL_McbspTxFsMode srgTxFrmSyncMode;
/** SRG clock synchronisation mode */
CSL_McbspClkgSyncMode srgClkSync;
} CSL_McbspClkSetup;
/**
@} */
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief This is a sub-structure in @a CSL_McbspHwSetup. This structure is used for
* configuring the parameters global to MCBSP
*/
typedef struct CSL_McbspGlobalSetup {
/** XMT and RCV IO enable bit */
CSL_McbspIOMode ioEnableMode;
/** Digital Loopback mode */
CSL_McbspDlbMode dlbMode;
/** Clock stop mode */
CSL_McbspClkStp clkStopMode;
} CSL_McbspGlobalSetup;
/**
@} */
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief This is a sub-structure in @a CSL_McbspHwSetup. This structure is used for
* configuring Multichannel mode parameters
*/
typedef struct CSL_McbspMulChSetup {
/** RCV partition */
CSL_McbspPartMode rxPartition;
/** XMT partition */
CSL_McbspPartMode txPartition;
/** RCV multichannel selection mode */
Uint16 rxMulChSel;
/** XMT multichannel selection mode */
Uint16 txMulChSel;
/** RCV partition A block */
CSL_McbspPABlk rxPartABlk;
/** RCV partition B block */
CSL_McbspPBBlk rxPartBBlk;
/** XMT partition A block */
CSL_McbspPABlk txPartABlk;
/** XMT partition B block */
CSL_McbspPBBlk txPartBBlk;
/** RCV 512 channel mode with PDMA */
Uint16 rx512channel;
/** XMT 512 channel mode with PDMA */
Uint16 tx512channel;
} CSL_McbspMulChSetup;
/**
@} */
/** @addtogroup CSL_MCBSP_DATASTRUCT
*
* @{ */
/**
* @brief This is the Setup structure for configuring MCBSP using @a CSL_mcbspHwSetup()
* function.
*/
typedef struct CSL_McbspHwSetup {
/** Global configuration parameters */
CSL_McbspGlobalSetup *global;
/** RCV data setup related parameters */
CSL_McbspDataSetup *rxdataset;
/** XMT data setup related parameters */
CSL_McbspDataSetup *txdataset;
/** Clock configuration parameters */
CSL_McbspClkSetup *clkset;
/** Multichannel mode configuration parameters */
CSL_McbspMulChSetup *mulCh;
/** Emulation mode parameters */
CSL_McbspEmu emumode ;
/** Transmit pin mode configuration, this is used to configure the DX pin
state while the time slot is disabled */
CSL_McbspDxState dxState;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -