📄 ccm_a.h
字号:
/* bus monitor. */
/* Input: */
/* CCMPtr : CCM base address associated with this driver. */
/* BusMonitorDebugModeVal : Bus Monitor response during debug mode. */
/* BusMonitorTimingVal : Time-out for the Bus Monitor. */
/* Output: */
/* CCM_A_ERR_NONE : No error */
/* CCM_A_ERR_INVALID_HANDLE : CCM base address parameter is zero */
/* CCM_A_ERR_INVALID_BUS_MONITOR_DEBUG_MODE_VALUE : Bus Monitor Debug */
/* mode value is out of range. */
/* CCM_A_ERR_INVALID_BUS_MONITOR_TIMING_VALUE : Bus Monitor Timing */
/* value is out of range.*/
/*----------------------------------------------------------------------*/
#define CCM_A_ConfigureBusMonitor( \
CCMPtr, \
BusMonitorDebugModeVal, \
BusMonitorTimingVal \
) \
( \
(CCM_A_PARAM_CHECKING) ? \
( \
((CCMPtr) == NULL) ? \
CCM_A_ERR_INVALID_HANDLE : \
(((BusMonitorDebugModeVal) < CCM_A_DISABLE_FOR_EXTERNAL_BUS_CYCLE ) || \
((BusMonitorDebugModeVal) > CCM_A_ENABLE_FOR_EXTERNAL_BUS_CYCLE)) ? \
CCM_A_ERR_INVALID_BUS_MONITOR_DEBUG_MODE_VALUE : \
(((BusMonitorTimingVal) < CCM_A_TIME_OUT_64) || \
((BusMonitorTimingVal) > CCM_A_TIME_OUT_8)) ? \
CCM_A_ERR_INVALID_BUS_MONITOR_TIMING_VALUE : \
CCM_A_ConfigureBusMonitor_f( \
(CCMPtr), \
(BusMonitorDebugModeVal), \
(BusMonitorTimingVal) \
) \
) \
: \
CCM_A_ConfigureBusMonitor_f( \
(CCMPtr), \
(BusMonitorDebugModeVal), \
(BusMonitorTimingVal) \
) \
) /* End of CCM_A_ConfigureBusMonitor Macro */
/*----------------------------------------------------------------------*/
/* Macro: CCM_A_GetResetStatus */
/* */
/* Purpose: */
/* Obtains the default operation of certain chip functions. */
/* Input: */
/* ResetConfigurationStruct: Pointer to Reset Configuration Register. */
/* Output: */
/* CCM_A_ERR_NONE : No error */
/* CCM_A_ERR_INVALID_HANDLE : CCM base address parameter is zero */
/* CCM_A_ERR_BAD_RESULT_ADDR : Result Pointer is zero. */
/*----------------------------------------------------------------------*/
#define CCM_A_GetResetStatus( \
CCMPtr, \
ResetConfigurationStruct \
) \
( \
(CCM_A_PARAM_CHECKING) ? \
( \
((CCMPtr) == NULL) ? \
CCM_A_ERR_INVALID_HANDLE : \
((ResetConfigurationStruct) == NULL) ? \
CCM_A_ERR_BAD_RESULT_ADDR : \
CCM_A_GetResetStatus_f( \
(CCMPtr), \
(ResetConfigurationStruct) \
) \
) \
: \
CCM_A_GetResetStatus_f( \
(CCMPtr), \
(ResetConfigurationStruct) \
) \
) /* End of CCM_A_GetResetStatus Macro */
/*----------------------------------------------------------------------*/
/* Macro: CCM_A_ConfigureSignalOperation */
/* */
/* Purpose: */
/* Enable and/or disable the TSIZ and PSTAT signal enables. */
/* Input: */
/* CCMPtr: CCM base address associated with this driver. */
/* TSIZSignalVal: TSIZ signal enable. */
/* PSTATSignalVal: PSTAT signal enable. */
/* Output: */
/* CCM_A_ERR_NONE : No error */
/* CCM_A_ERR_INVALID_HANDLE : CCM base address parameter is zero */
/* CCM_A_ERR_INVALID_TSIZ_SIGNAL_VALUE: TSIZ signal enable value is */
/* out of range. */
/* CCM_A_ERR_INVALID_PSTAT_SIGNAL_VALUE: PSTAT signal enable value is */
/* out of range. */
/*----------------------------------------------------------------------*/
#define CCM_A_ConfigureSignalOperation( \
CCMPtr, \
TSIZSignalVal, \
PSTATSignalVal \
) \
( \
(CCM_A_PARAM_CHECKING) ? \
( \
((CCMPtr) == NULL) ? \
CCM_A_ERR_INVALID_HANDLE : \
(((TSIZSignalVal) < CCM_A_TSIZ_FUNCTION_DISABLED) || \
((TSIZSignalVal) > CCM_A_TSIZ_FUNCTION_ENABLED)) ? \
CCM_A_ERR_INVALID_TSIZ_SIGNAL_VALUE : \
(((PSTATSignalVal) < CCM_A_PSTAT_FUNCTION_DISABLED) || \
((PSTATSignalVal) > CCM_A_PSTAT_FUNCTION_ENABLED)) ? \
CCM_A_ERR_INVALID_PSTAT_SIGNAL_VALUE : \
CCM_A_ConfigureSignalOperation_f( \
CCMPtr, \
TSIZSignalVal, \
PSTATSignalVal \
) \
) \
: \
CCM_A_ConfigureSignalOperation_f( \
CCMPtr, \
TSIZSignalVal, \
PSTATSignalVal \
) \
) /* End of CCM_A_ConfigureSignalOperation Macro */
/*----------------------------------------------------------------------*/
/* Macro: CCM_A_GetChipIdentification */
/* */
/* Purpose: */
/* Obtain the chip part identification and revision numbers. */
/* Input: */
/* CCMPtr: CCM base address associated with this driver. */
/* ChipIdentificationStruct: Pointer to Chip Identification Register. */
/* Output: */
/* CCM_A_ERR_NONE : No error */
/* CCM_A_ERR_INVALID_HANDLE : CCM base address parameter is zero */
/* CCM_A_ERR_BAD_RESULT_ADDR : Result Pointer is zero. */
/*----------------------------------------------------------------------*/
#define CCM_A_GetChipIdentification( \
CCMPtr, \
ChipIdentificationStruct \
) \
( \
(CCM_A_PARAM_CHECKING) ? \
( \
((CCMPtr) == NULL) ? \
CCM_A_ERR_INVALID_HANDLE : \
((ChipIdentificationStruct) == NULL) ? \
CCM_A_ERR_BAD_RESULT_ADDR : \
CCM_A_GetChipIdentification_f( \
(CCMPtr), \
(ChipIdentificationStruct) \
) \
) \
: \
CCM_A_GetChipIdentification_f( \
(CCMPtr), \
(ChipIdentificationStruct) \
) \
) /* End of CCM_A_GetChipIdentification Macro */
/*----------------------------------------------------------------------*/
/* Macro: CCM_A_SetRegister */
/* */
/* Purpose: */
/* Write a 16-bit data value to a sub-set of CCM Module */
/* registers. Parameter checking is a compile-time option. */
/* Input: */
/* CCMPtr : CCM_A base address associated with this driver. */
/* RegisterValue : Data to copy into selected CCM_A register. */
/* Output: */
/* CCM_A_ERR_NONE : No error */
/* CCM_A_ERR_INVALID_HANDLE : CCM base address parameter is zero */
/*----------------------------------------------------------------------*/
#define CCM_A_SetRegister( CCMPtr, \
RegisterValue \
) \
( \
(CCM_A_PARAM_CHECKING) ? \
( \
((CCMPtr) == NULL) ? \
CCM_A_ERR_INVALID_HANDLE : \
CCM_A_SetRegister_f( (CCMPtr), \
(RegisterValue) \
) \
) \
: \
CCM_A_SetRegister_f( (CCMPtr), \
(RegisterValue) \
) \
) /* End of CCM_A_SetRegister Macro */
/*----------------------------------------------------------------------*/
/* Macro: CCM_A_GetRegister */
/* */
/* Purpose: */
/* Return the contents of a sub-set of CCM Module registers. */
/* Parameter checking is a compile-time option. */
/* Input: */
/* CCMPtr: CCM_A base address associated with this driver. */
/* CCM_ARegister: Select among a sub-set of CCM_A registers. */
/* GetRegisterPtr: Result address for selected CCM_A register data. */
/* Output: */
/* CCM_A_ERR_NONE: No error */
/* CCM_A_ERR_INVALID_HANDLE: CCM base address parameter is zero */
/* CCM_A_ERR_INVALID_REGISTER: CCM Register Selection switch is */
/* invalid. */
/*----------------------------------------------------------------------*/
#define CCM_A_GetRegister( \
CCMPtr, \
CCM_ARegister, \
GetRegisterPtr \
) \
( \
(CCM_A_PARAM_CHECKING) ? \
( \
((CCMPtr) == NULL) ? \
CCM_A_ERR_INVALID_HANDLE : \
((GetRegisterPtr) == NULL) ? \
CCM_A_ERR_BAD_RESULT_ADDR : \
(((CCM_ARegister) < CCM_A_CCR) || \
((CCM_ARegister) > CCM_A_CIR)) ? \
CCM_A_ERR_INVALID_REGISTER : \
CCM_A_GetRegister_f( (CCMPtr), \
(CCM_ARegister), \
(GetRegisterPtr) \
) \
) \
: \
CCM_A_GetRegister_f( (CCMPtr), \
(CCM_ARegister), \
(GetRegisterPtr) \
) \
) /* End of CCM_A_GetRegister Macro */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -