📄 csl_mcasp.h
字号:
* @brief Reset clock circuitry for transmit
* @param (None)
*/
CSL_MCASP_CMD_CLK_RESET_XMT = 13,
/**
* @brief Set receive clock registers with value
* (CSL_McaspHwSetupDataClk*) passed
* @param (CSL_McaspHwSetupDataClk *)
*/
CSL_MCASP_CMD_CLK_SET_RCV = 14,
/**
* @brief Set transmit clock registers with value
* (CSL_McaspHwSetupDataClk*) passed
* @param (CSL_McaspHwSetupDataClk *)
*/
CSL_MCASP_CMD_CLK_SET_XMT = 15,
/**
* @brief Configure the format, frame sync, and other parameters related
* to the transmit section
* @param (CSL_McaspHwSetupData *)
*/
CSL_MCASP_CMD_CONFIG_XMT_SECTION = 16,
/**
* @brief Configure the format, frame sync, and other parameters related
* to the receive section
* @param (CSL_McaspHwSetupData *)
*/
CSL_MCASP_CMD_CONFIG_RCV_SECTION = 17,
/**
* @brief Sets a particular serializer to act as transmitter
* @param (CSL_McaspSerializerNum *)
*/
CSL_MCASP_CMD_SET_SER_XMT = 18,
/**
* @brief Sets a particular serializer to act as receiver
* @param (CSL_McaspSerializerNum *)
*/
CSL_MCASP_CMD_SET_SER_RCV = 19,
/**
* @brief Sets a particular serializer as inactivated
* @param (CSL_McaspSerializerNum *)
*/
CSL_MCASP_CMD_SET_SER_INA = 20,
/**
* @brief Writes to the channel status RAM
* @param (CSL_McaspChStatusRam *)
*/
CSL_MCASP_CMD_WRITE_CHAN_STAT_RAM = 21,
/**
* @brief Writes to the user data RAM
* @param (CSL_McaspUserDataRam *)
*/
CSL_MCASP_CMD_WRITE_USER_DATA_RAM = 22,
/**
* @brief Resets the bits related to transmit in transmitter global
* control register
* @param (None)
*/
CSL_MCASP_CMD_RESET_XMT = 23,
/**
* @brief Resets the bits related to receive in transmitter global
* control register
* @param (None)
*/
CSL_MCASP_CMD_RESET_RCV = 24,
/**
* @brief Resets transmit frame sync generator and transmit state
* machine in transmitter global control register
* @param (None)
*/
CSL_MCASP_CMD_RESET_SM_FS_XMT = 25,
/**
* @brief Resets receive frame sync generator and receive state
* machine in receiver global control register
* @param (None)
*/
CSL_MCASP_CMD_RESET_SM_FS_RCV = 26,
/**
* @brief Sets the bits related to transmit in transmitter global
* control register
* @param (None)
*/
CSL_MCASP_CMD_ACTIVATE_XMT_CLK_SER = 27,
/**
* @brief Sets the bits related to receive in receiver global control
* register
* @param (None)
*/
CSL_MCASP_CMD_ACTIVATE_RCV_CLK_SER = 28,
/**
* @brief Activates receive and transmit state
* machine in global control register
* @param (None)
*/
CSL_MCASP_CMD_ACTIVATE_SM_RCV_XMT = 29,
/**
* @brief Activates receive and transmit frame sync
* generator in global control register
* @param (None)
*/
CSL_MCASP_CMD_ACTIVATE_FS_RCV_XMT = 30,
/**
* @brief Enables/disables the DIT mode
* @param (Bool *)
*/
CSL_MCASP_CMD_SET_DIT_MODE = 31
} CSL_McaspHwControlCmd;
/**
* @brief Enumeration for hardware status query commands passed to @a CSL_mcaspGetHwStatus()
*
* This is used to get the status of different operations or to get the
* existing setup of McASP.
*/
typedef enum {
/**
* @brief Return current transmit slot being transmitted
* @param (Uint16 *)
*/
CSL_MCASP_QUERY_CURRENT_XSLOT = 1,
/**
* @brief Return current receive slot being received
* @param (Uint16 *)
*/
CSL_MCASP_QUERY_CURRENT_RSLOT = 2,
/**
* @brief Return transmit error status bit
* @param (Bool *)
*/
CSL_MCASP_QUERY_XSTAT_XERR = 3,
/**
* @brief Return transmit clock failure flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_XSTAT_XCLKFAIL = 4,
/**
* @brief Return unexpected transmit frame sync flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_XSTAT_XSYNCERR = 5,
/**
* @brief Return transmit underrun flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_XSTAT_XUNDRN = 6,
/**
* @brief Return transmit data ready flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_XSTAT_XDATA = 7,
/**
* @brief Return receive error status bit
* @param (Bool *)
*/
CSL_MCASP_QUERY_RSTAT_RERR = 8,
/**
* @brief Return receive clock failure flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_RSTAT_RCLKFAIL = 9,
/**
* @brief Return unexpected receive frame sync flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_RSTAT_RSYNCERR = 10,
/**
* @brief Return receive overrun flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_RSTAT_ROVRN = 11,
/**
* @brief Return receive data ready flag status
* @param (Bool *)
*/
CSL_MCASP_QUERY_RSTAT_RDATA = 12,
/**
* @brief Return status whether the serializer is ready to receive or not
* @param (CSL_McaspSerQuery *)
*/
CSL_MCASP_QUERY_SRCTL_RRDY = 13,
/**
* @brief Return status whether the serializer is ready to transmit
* or not
* @param (CSL_McaspSerQuery *)
*/
CSL_MCASP_QUERY_SRCTL_XRDY = 14,
/**
* @brief Return status whether serializer is configured to
* transmit/receive/inactive
* @param (CSL_McaspSerQuery *)
*/
CSL_MCASP_QUERY_SRCTL_SRMOD = 15,
/**
* @brief Return the value of transmitter status register.
* @param (Uint16 *)
*/
CSL_MCASP_QUERY_XSTAT = 16,
/**
* @brief Return the value of receiver status register.
* @param (Uint16 *)
*/
CSL_MCASP_QUERY_RSTAT = 17,
/**
* @brief Return the transmit state machine and transmit frame sync
* generator values in transmitter global control register
* @param (Uint8 *)
* @li 0x00 - Both transmit frame generator sync and transmit
* state machine are reset.
* @li 0x1 - Only transmit state machine is active.
* @li 0x10 - Only transmit frame sync generator is active.
* @li 0x11 - Both transmit frame generator sync and transmit
* state machine are active.
*/
CSL_MCASP_QUERY_SM_FS_XMT = 18,
/**
* @brief Return the receive state machine and receive frame sync
* generator values in receiver global control register
* @param (Uint8 *)
* @li 0x00 - Both receive frame generator sync and receive state
* machine are reset.
* @li 0x1 - Only receive state machine is active.
* @li 0x10 - Only receive frame sync generator is active.
* @li 0x11 - Both receive frame generator sync and receive state
* machine are active.
*/
CSL_MCASP_QUERY_SM_FS_RCV = 19,
/**
* @brief Queries whether DIT mode is set or not
* @param (Bool *)
*/
CSL_MCASP_QUERY_DIT_MODE = 20
} CSL_McaspHwStatusQuery;
/**
* @brief This will have the base-address information for the peripheral
* instance
*/
typedef struct {
/** Base-address of the configuration registers of the peripheral */
CSL_McaspRegsOvly regs;
/** Number of serializers */
Int32 numOfSerializers;
/** Support for DIT mode */
Bool ditStatus;
} CSL_McaspChipContext;
/**
* @brief Module specific context information. Present implementation doesn't
* have any context information.
*/
typedef struct {
/**
* Context information of McASP.
* The below declaration is just a place-holder for future
* implementation.
*/
Uint16 contextInfo;
} CSL_McaspContext;
/**
* @brief This data type is used to return the handle to an
* instance of McASP
*/
typedef struct CSL_McaspObj *CSL_McaspHandle;
/** @brief Default values for hardware setup structure */
#define CSL_MCASP_HWSETUP_DEFAULTS {\
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},\
{0,0,0,0,0,0,0,0x20,0x8000,0},\
{0,0,0,0,0,0,0,0x20,0x8000,0},\
0\
}
/** @brief Default values for config structure */
#define CSL_MCASP_CONFIG_DEFAULTS {\
CSL_MCASP_PWRDEMU_RESETVAL,\
CSL_MCASP_PFUNC_RESETVAL,\
CSL_MCASP_PDIR_RESETVAL,\
CSL_MCASP_PDOUT_RESETVAL,\
CSL_MCASP_PDIN_PDSET_RESETVAL,\
CSL_MCASP_PDCLR_RESETVAL,\
CSL_MCASP_GBLCTL_RESETVAL,\
CSL_MCASP_AMUTE_RESETVAL,\
CSL_MCASP_DLBCTL_RESETVAL,\
CSL_MCASP_DITCTL_RESETVAL,\
CSL_MCASP_RMASK_RESETVAL,\
CSL_MCASP_RFMT_RESETVAL,\
CSL_MCASP_AFSRCTL_RESETVAL,\
CSL_MCASP_ACLKRCTL_RESETVAL,\
CSL_MCASP_AHCLKRCTL_RESETVAL,\
CSL_MCASP_RTDM_RESETVAL,\
CSL_MCASP_RINTCTL_RESETVAL,\
CSL_MCASP_RSTAT_RESETVAL,\
CSL_MCASP_RCLKCHK_RESETVAL,\
CSL_MCASP_REVTCTL_RESETVAL,\
CSL_MCASP_XMASK_RESETVAL,\
CSL_MCASP_XFMT_RESETVAL,\
CSL_MCASP_AFSXCTL_RESETVAL,\
CSL_MCASP_ACLKXCTL_RESETVAL,\
CSL_MCASP_AHCLKXCTL_RESETVAL,\
CSL_MCASP_XTDM_RESETVAL,\
CSL_MCASP_XINTCTL_RESETVAL,\
CSL_MCASP_XSTAT_RESETVAL,\
CSL_MCASP_XCLKCHK_RESETVAL,\
CSL_MCASP_XEVTCTL_RESETVAL,\
CSL_MCASP_SRCTL0_RESETVAL,\
CSL_MCASP_SRCTL1_RESETVAL,\
CSL_MCASP_SRCTL2_RESETVAL,\
CSL_MCASP_SRCTL3_RESETVAL,\
CSL_MCASP_SRCTL4_RESETVAL,\
CSL_MCASP_SRCTL5_RESETVAL,\
CSL_MCASP_SRCTL6_RESETVAL,\
CSL_MCASP_SRCTL7_RESETVAL,\
CSL_MCASP_SRCTL8_RESETVAL,\
CSL_MCASP_SRCTL9_RESETVAL,\
CSL_MCASP_SRCTL10_RESETVAL,\
CSL_MCASP_SRCTL11_RESETVAL,\
CSL_MCASP_SRCTL12_RESETVAL,\
CSL_MCASP_SRCTL13_RESETVAL,\
CSL_MCASP_SRCTL14_RESETVAL,\
CSL_MCASP_SRCTL15_RESETVAL\
}
/******************************************************************************
* Multi channel audio serial port global function declarations
*****************************************************************************/
/**
* ============================================================================
* @func CSL_mcaspInit
*
* @desc
* @n This is the initialization function for McASP CSL. This function
* needs to be called before any McASP CSL functions are to be called.
* This function is idem-potent. Currently, this function does not
* perform anything.
*
* @arg pContext
* Context information for McASP
*
* @ret CSL_Status
* CSL_SOK - Always returns
*
* @eg
* CSL_mcaspInit (NULL);
* ============================================================================
*/
extern CSL_Status CSL_mcaspInit(
CSL_McaspContext *pContext
);
/**
*=============================================================================
* @func CSL_mcaspOpen
*
* @desc
* @n This function populates the peripheral data object for the instance
* and returns a handle to the instance.
*
* @arg pMcaspObj
* Pointer to the McASP instance object
*
* @arg mcaspNum
* Instance of the McASP to be opened. There is two instance of
* McASP on C672x.
*
* @arg pMcaspParam
* Pointer to module specific parameters
*
* @arg pStatus
* pointer for returning status of the function call
*
* @ret CSL_McaspHandle
* Valid McASP instance handle will be returned if status value is
* equal to CSL_SOK.
*
* @eg
* CSL_status status;
* CSL_McaspObj mcaspObj;
* CSL_McaspHandle hMcasp;
*
* hMcasp = CSL_McaspOpen (&mcaspObj,
* CSL_MCASP_1,
* NULL,
* &status
* );
*
* ============================================================================
*/
extern CSL_McaspHandle CSL_mcaspOpen (
CSL_McaspObj *pMcaspObj,
CSL_InstNum mcaspNum,
CSL_McaspParam *pMcaspParam,
CSL_Status *pStatus
);
/**
* ============================================================================
* @func CSL_mcaspClose
*
* @desc
* @n This function closes the specified instance of McASP.
*
* @arg hMcasp
Handle to the McASP instance
*
* @ret CSL_Status
* CSL_SOK - Close successful
* CSL_ESYS_BADHANDLE - Invalid handle
*
* @eg
* CSL_McaspHandle hMcasp;
*
* CSL_mcaspClose (hMcasp);
* ============================================================================
*/
extern CSL_Status CSL_mcaspClose (
CSL_McaspHandle hMcasp
);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -