📄 csl_dmax.h
字号:
/** Event Type */
Uint32 etype;
/** Pointer to parameterSetup */
CSL_DmaxParameterSetup paramSetup;
/** Quantum Transfer Size Limit */
Uint8 qtsl;
/** Transfer Synchronization */
Uint8 sync;
/** Transfer Complete Code */
Uint8 tcc;
/** Alternate Transfer Mode Interrupt */
Uint8 atcint;
/** Transfer Completion Interrupt */
Uint8 tcint;
/** Reload */
Uint8 rload;
/** Water Mark Enable */
Uint8 wmenab;
/** Pointer to Transfer Entry */
Uint8 pte;
} CSL_DmaxFifoTransferEventSetup;
/** @brief This structure contains the information needed to perform HW setup
* for CPU interrupt requests.
*
*/
typedef struct {
/** Event Type */
Uint32 etype;
/** CPU Interrupt Line */
Uint8 cpuInt;
}CSL_DmaxCpuintEventSetup;
/** @brief This object contains the reference to the instance of DMAX opened
* using in the @a CSL_dmaxOpen().
*
*/
typedef struct CSL_DmaxAlloc {
/** Maximum Count */
Uint16 maxCount;
/** Allocation Map */
Uint32 allocMap;
} CSL_DmaxAlloc;
/** @brief This object contains the reference to the instance of DMAX opened
* using in the @a CSL_dmaxOpen().
*
*/
typedef struct CSL_DmaxResourceAlloc {
/** Dmax High Priority Event */
CSL_DmaxAlloc cslDmaxHpecrAlloc;
/** Dmax Low Priority Event */
CSL_DmaxAlloc cslDmaxLpecrAlloc;
/** Dmax High Priority Parameter */
CSL_DmaxAlloc cslDmaxHpptAlloc;
/** Dmax Low Priority Parameter */
CSL_DmaxAlloc cslDmaxLpptAlloc;
} CSL_DmaxResourceAlloc;
/** @brief This object contains the reference to the instance of DMAX opened
* using the @a CSL_dmaxOpen().
*
* The pointer to this, is passed to all DMAX CSL APIs.
*/
typedef struct CSL_DmaxObj {
/** Pointer to entry in High Event Table reserved for this event */
Uint32 *hiTableEventEntryPtr;
/** Pointer to entry in Low Event Table reserved for this event */
Uint32 *loTableEventEntryPtr;
/** Pointer to the dmax Registers */
CSL_DmaxRegsOvly regs;
/** Event Number */
Uint32 eventUid;
/** Parameter Entry Number */
Uint32 paramUid;
/** Pointer to the associated parameter entry */
Uint8 paramPtr;
/** This is the instance of DMAX being referred to by this object */
CSL_InstNum perNum;
}CSL_DmaxObj;
/** @brief This will have the base-address information for the peripheral
* instance
*/
typedef struct {
/** Base-address of the Configuration registers of DMAX.
*/
CSL_DmaxRegsOvly regs;
} CSL_DmaxBaseAddress;
/** @brief DMAX 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_DmaxParam;
/** @brief DMAX specific parameters. Present implementation doesn't have
* any specific parameters.The below declaration is just a place-holder
* for future implementation.
*/
typedef struct {
/** Context information of DMAX.
* The below declaration is just a place-holder for future
* implementation.
*/
Uint16 contextInfo;
} CSL_DmaxContext;
/** @brief This structure defines the overlay for accessing entries in the Hi
* Priority Parameter Table.
*
*/
typedef struct {
/** Parameter Table word0 */
volatile Uint32 word0;
/** Parameter Table word1 */
volatile Uint32 word1;
/** Parameter Table word2 */
volatile Uint32 word2;
/** Parameter Table word3 */
volatile Uint32 word3;
/** Parameter Table word4 */
volatile Uint32 word4;
/** Parameter Table word5 */
volatile Uint32 word5;
/** Parameter Table word6 */
volatile Uint32 word6;
/** Parameter Table word7 */
volatile Uint32 word7;
/** Parameter Table word8 */
volatile Uint32 word8;
/** Parameter Table word9 */
volatile Uint32 word9;
/** Parameter Table word10 */
volatile Uint32 word10;
} CSL_DmaxParameterEntry;
/** @brief Config structure of DMAX. This is used to configure DMAX
* using CSL_HwSetupRaw function
*/
typedef struct {
/** Event Control */
Uint32 eventCtrl;
/** DMAX parameter Entry Pointer */
CSL_DmaxParameterEntry *paramEntry;
/** Dmax Event Type */
Uint8 eventType;
/** DMAX priority */
Uint8 priority;
/** DMAX Polarity */
Uint8 polarity;
} CSL_DmaxConfig;
/** Default Values for Config structure */
#define CSL_DMAX_CONFIG_DEFAULTS { \
0x0, \
CSL_DMAX_EVENT0_ETYPE_FIFOWRITE, \
0x0, \
0x0, \
0x0, \
0x0, \
0x0, \
0x0, \
0x0, \
0x0, \
0x0, \
0x0 \
}
/**
* @brief This data type is used to return the handle to an
* instance of DMAX
*/
typedef struct CSL_DmaxObj *CSL_DmaxHandle;
/** @brief This has all the fields required to configure DMAX at Power Up
* (After a Hardware Reset) or a Soft Reset
*
* This structure is used to setup or obtain existing setup of
* DMAX using @a CSL_dmaxHwSetup() & @a CSL_dmaxGetHwSetup() functions
* respectively.
*/
typedef struct CSL_DmaxHwSetup {
/** DMAX Priority */
Uint8 priority;
/** DMAX Polarity */
Uint8 polarity;
/** Generic Pointer for setup */
CSL_DmaxEventSetup eventSetup;
}CSL_DmaxHwSetup;
/**
* @brief This structure is used to setup the Event Type
*/
typedef struct {
/** Event Type */
Uint32 etype;
} CSL_DmaxEtype;
/** @brief Enumeration for queries passed to @a CSL_dmaxGetHwStatus()
*
* This is used to get the status of different operations or to get the
* existing setup of DMAX.
*/
typedef enum {
/**
* @brief Get status of the Event Flag.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_EVENTFLAG = 1,
/**
* @brief Get the status of the Transfer Complete flag.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_TCC = 2,
/**
* @brief Get the status of TC.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_TC = 3,
/**
* @brief Get the status of FIFO full.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_FMSC = 4,
/**
* @brief Get the status of FIFO empty.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_EMSC = 5,
/**
* @brief Get the status of the FIFO error Flag/Interrupt.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_FIFO_ERROR = 6,
/**
* @brief Get the status of the FIFO error Code.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_FIFO_ERROR_CODE = 7,
/**
* @brief Get the status of the Event entry of the specified Event.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_EVENT_ENTRY = 8,
/**
* @brief Get the status of the parameter entry of the specified Event.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_PARAMETER_ENTRY = 9,
/**
* @brief Get the status of the High dmax.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_HBC = 10,
/**
* @brief Get the status of the Low dmax.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_LBC = 11,
/**
* @brief Get the status of the FIFO Address.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_FIFO_ADDR = 12,
/**
* @brief Get the Event entry Address.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_EVENT_ENTRY_ADDR = 13,
/**
* @brief Get the Parameter entry Address.
* @param (CSL_DmaxParameterEntry*)
*/
CSL_DMAX_QUERY_GET_PARAMETER_ENTRY_ADDR = 14,
/**
* @brief Get the FIFO full status.
* @param (Uint32*)
*/
CSL_DMAX_QUERY_GET_FIFO_FULL = 15
} CSL_DmaxHwStatusQuery;
/** @brief Enumeration for queries passed to @a CSL_dmaxHwControl()
*
* This is used to select the commands to control the operations
* existing setup of DMAX. The arguments to be passed with each
* enumeration if any are specified next to the enumeration.
*/
typedef enum {
/**
* @brief Set Priority of Event.
* @param (None)
*/
CSL_DMAX_CMD_SETPRIORITY = 1,
/**
* @brief Sets Polarity of Event.
* @param (None)
*/
CSL_DMAX_CMD_SETPOLARITY = 2,
/**
* @brief Enables Event.
* @param (None)
*/
CSL_DMAX_CMD_EVENTENABLE = 3,
/**
* @brief Clears TCC Event flag.
* @param (None)
*/
CSL_DMAX_CMD_CLEARTCC = 4,
/**
* @brief Disables Event.
* @param (None)
*/
CSL_DMAX_CMD_EVENTDISABLE = 5,
/**
* @brief Clears the Event Entry.
* @param (Uint16 *)
*/
CSL_DMAX_CMD_CLEAREVENTENTRY = 6,
/**
* @brief Clears Parameter Entry.
* @param (Uint16 *)
*/
CSL_DMAX_CMD_CLEARPARAMENTRY = 7,
/**
* @brief Set the start Sync Transfer.
* @param (None)
*/
CSL_DMAX_CMD_STARTASYNCTRANSFER = 8,
/**
* @brief Set the FIFO status clear bit.
* @param (None)
*/
CSL_DMAX_CMD_CLEARFIFOSTATUS = 9,
/**
* @brief Set the Water Mark Enable.
* @param (None)
*/
CSL_DMAX_CMD_WATERMARK_ENABLE = 10,
/**
* @brief Set the Water Mark Disable.
* @param (None)
*/
CSL_DMAX_CMD_WATERMARK_DISABLE = 11
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -