📄 reset_a.h
字号:
((RESETPtr) == NULL) ? \
RESET_A_ERR_INVALID_HANDLE : \
(((ExternalResetControlVal) < Reset_A_DISABLE) || \
((ExternalResetControlVal) > Reset_A_ENABLE)) ? \
RESET_A_ERR_INVALID_EXTERNAL_RESET_PARAMETER : \
Reset_A_ControlExternalReset_f( \
(RESETPtr), \
(ExternalResetControlVal) \
) \
) \
: \
Reset_A_ControlExternalReset_f( \
(RESETPtr), \
(ExternalResetControlVal) \
) \
) /* end of Reset_A_ControlExternalReset */
/*----------------------------------------------------------------------*/
/* Macro: Reset_A_SoftReset */
/* */
/* Purpose: */
/* Reset_A_SoftReset allows software to request a reset. */
/* Input: */
/* RESETPtr : Reset module base address associated with this driver. */
/* SoftResetControlVal : Allows software to request a reset. */
/* Output: */
/* RESET_A_ERR_NONE : No error. */
/* RESET_A_ERR_INVALID_SOFT_RESET_PARAMETER : The soft reset value is */
/* out of range. */
/*----------------------------------------------------------------------*/
#define Reset_A_SoftReset( RESETPtr \
) \
( \
(RESET_A_PARAM_CHECKING) ? \
( \
((RESETPtr) == NULL) ? \
RESET_A_ERR_INVALID_HANDLE : \
Reset_A_SoftReset_f( (RESETPtr) \
) \
) \
: \
Reset_A_SoftReset_f( (RESETPtr) \
) \
) /* End of Reset_A_SoftReset Macro */
/*----------------------------------------------------------------------*/
/* Macro: Reset_A_GetResetStatus */
/* */
/* Purpose: */
/* Reset_A_GetStatus returns the reset status of the modules. */
/* Parameter checking is a compile-time option. */
/* Input: */
/* RESETPtr : RESET base address associated with this driver. */
/* StatusPtr: Result address for specified queue completion status */
/* Output: */
/* RESET_A_ERR_NONE : No error */
/* RESET_A_ERR_INVALID_HANDLE : RESET base address parameter is zero */
/* RESET_A_ERR_BAD_RESULT_ADDR : Result pointer is zero */
/*----------------------------------------------------------------------*/
#define Reset_A_GetResetStatus( RESETPtr, \
StatusPtr \
) \
( \
(RESET_A_PARAM_CHECKING) ? \
( \
((RESETPtr) == NULL) ? \
RESET_A_ERR_INVALID_HANDLE : \
((StatusPtr) == NULL) ? \
RESET_A_ERR_BAD_RESULT_ADDR : \
Reset_A_GetResetStatus_f( (RESETPtr), \
(StatusPtr) \
) \
) \
: \
Reset_A_GetResetStatus_f( (RESETPtr), \
(StatusPtr) \
) \
) /* End of Reset_A_GetResetStatus Macro */
/*----------------------------------------------------------------------*/
/* Macro: Reset_A_SetRegister */
/* */
/* Purpose: */
/* Write an 8-bit data value to a sub-set of Reset Module */
/* registers. Parameter checking is a compile-time option. */
/* Input: */
/* RESETPtr : RESET_A base address associated with this driver.*/
/* RegisterValue : Data to copy into selected RESET_A register. */
/* Output: */
/* RESET_A_ERR_NONE : No error */
/* RESET_A_ERR_INVALID_HANDLE : Reset base address parameter is zero*/
/*----------------------------------------------------------------------*/
#define Reset_A_SetRegister( RESETPtr, \
RegisterValue \
) \
( \
(RESET_A_PARAM_CHECKING) ? \
( \
((RESETPtr) == NULL) ? \
RESET_A_ERR_INVALID_HANDLE : \
Reset_A_SetRegister_f( (RESETPtr), \
(RegisterValue) \
) \
) \
: \
Reset_A_SetRegister_f( (RESETPtr), \
(RegisterValue) \
) \
) /* End of Reset_A_SetRegister Macro */
/*----------------------------------------------------------------------*/
/* Macro: RESET_A_GetRegister */
/* */
/* Purpose: */
/* Return the contents of a sub-set of Reset Module registers. */
/* Parameter checking is a compile-time option. */
/* Input: */
/* RESETPtr : Reset_A base address associated with this driver. */
/* RESETRegSwitch : Select among a sub-set of Reset_A registers. */
/* GetRegisterPtr : Result address for selected Reset_A register data.*/
/* Output: */
/* RESET_A_ERR_NONE : No error */
/* RESET_A_ERR_INVALID_HANDLE : RESET base address parameter is zero */
/* RESET_A_ERR_BAD_RESULT_ADDR : Result Pointer is zero */
/* RESET_A_ERR_INVALID_REGISTER : RESET Register Selection switch is */
/* invalid */
/*----------------------------------------------------------------------*/
#define Reset_A_GetRegister( \
RESETPtr, \
RESETRegisterSwitch, \
GetRegisterPtr \
) \
( \
(RESET_A_PARAM_CHECKING) ? \
( \
((RESETPtr) == NULL) ? \
RESET_A_ERR_INVALID_HANDLE : \
((GetRegisterPtr) == NULL) ? \
RESET_A_ERR_BAD_RESULT_ADDR : \
(((RESETRegisterSwitch) < Reset_A_RCR) || \
((RESETRegisterSwitch) > Reset_A_RSR)) ? \
RESET_A_ERR_INVALID_REGISTER : \
Reset_A_GetRegister_f( (RESETPtr), \
(RESETRegisterSwitch), \
(GetRegisterPtr) \
) \
) \
: \
Reset_A_GetRegister_f( (RESETPtr), \
(RESETRegisterSwitch), \
(GetRegisterPtr) \
) \
) /* End of Reset_A_GetRegister Macro */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -