📄 pll_b.h
字号:
/* */
/* Input: */
/* PLLPtr : PLL_B base address for this driver. */
/* Register : Select amount the PLL registers */
/* GetRegisterPtr : Result address for selected PLL register value */
/* */
/* Output: */
/* PLL_B_ERR_NONE : No error */
/* PLL_B_ERR_INVALID_HANDLE : PLL base address is zero. */
/* PLL_B_ERR_INVALID_LOSS_LOCK_RESET : Invalid Reset on loss lock */
/* PLL_B_ERR_INVALID_LOSS_CLOCK_RESET : Invalid Reset on loss clock */
/* PLL_B_ERR_INVALID_MONITOR_CLOCK : Invalid monitor loss clock */
/**********************************************************************/
#define PLL_B_ControlClockFailureResponse( \
PLLPtr, \
ResetOnLockFailureValue, \
ResetOnClockFailureValue, \
MonitorClockFailureValue \
) \
( \
(PLL_B_PARAM_CHECKING) ? \
( \
((PLLPtr) == NULL) ? \
PLL_B_ERR_INVALID_HANDLE : \
\
((ResetOnLockFailureValue < PLL_B_RESET_ON_LOCK_FAILURE_DISABLE) \
|| (ResetOnLockFailureValue > PLL_B_RESET_ON_LOCK_FAILURE_ENABLE))? \
PLL_B_ERR_INVALID_LOSS_LOCK_RESET: \
\
((ResetOnClockFailureValue <PLL_B_RESET_ON_CLOCK_FAILURE_DISABLE) \
|| (ResetOnClockFailureValue >PLL_B_RESET_ON_CLOCK_FAILURE_ENABLE))?\
PLL_B_ERR_INVALID_LOSS_CLOCK_RESET: \
\
((MonitorClockFailureValue < PLL_B_MONITOR_CLOCK_FAILURE_DISABLE) \
|| (MonitorClockFailureValue >PLL_B_MONITOR_CLOCK_FAILURE_ENABLE))? \
PLL_B_ERR_INVALID_MONITOR_CLOCK: \
\
PLL_B_ControlClockFailureResponse_f( (PLLPtr), \
(ResetOnLockFailureValue), \
(ResetOnClockFailureValue), \
(MonitorClockFailureValue) ) \
) \
: \
PLL_B_ControlClockFailureResponse_f( (PLLPtr), \
(ResetOnLockFailureValue), \
(ResetOnClockFailureValue), \
(MonitorClockFailureValue) \
) \
\
) /* end of PLL_B_ControlClockFailureResponse Macro */
/**********************************************************************/
/* Macro: PLL_B_ControlStopMode */
/* */
/* Purpose: Call PLL_B_ControlStopMode_f function with optional */
/* parameter checking. */
/* */
/* Input: */
/* PLLPtr : PLL_B base address for this driver. */
/* Register : Select amount the PLL registers */
/* GetRegisterPtr : Result address for selected PLL register value */
/* */
/* Output: */
/* PLL_B_ERR_NONE : No error */
/* PLL_B_ERR_INVALID_HANDLE : PLL base address is zero. */
/* PLL_B_ERR_INVALID_FAST_WAKEUP : Fast wakeup is invalid */
/* PLL_B_ERR_INVALID_STOP_MODE : Stop mode selection is invalid */
/**********************************************************************/
#define PLL_B_ControlStopMode( \
PLLPtr, \
FastWakeupValue, \
StopModeValue \
) \
( \
(PLL_B_PARAM_CHECKING) ? \
( \
((PLLPtr) == NULL) ? \
PLL_B_ERR_INVALID_HANDLE : \
\
((FastWakeupValue < PLL_B_FAST_WAKEUP_DISABLE) \
|| (FastWakeupValue > PLL_B_FAST_WAKEUP_ENABLE))? \
PLL_B_ERR_INVALID_FAST_WAKEUP: \
\
((StopModeValue < PLL_B_ENABLE_PLL_OSC_CLKOUT) \
|| (StopModeValue > PLL_B_DISABLE_ALL))? \
PLL_B_ERR_INVALID_STOP_MODE: \
\
PLL_B_ControlStopMode_f( (PLLPtr), \
(FastWakeupValue), \
(StopModeValue) \
) \
) \
: \
PLL_B_ControlStopMode_f( (PLLPtr), \
(FastWakeupValue), \
(StopModeValue) \
) \
\
) /* end of PLL_B_ControlStopMode Macro */
/**********************************************************************/
/* Macro: PLL_B_ControlVCOOutput */
/* */
/* Purpose: Call PLL_B_Init_f function with optional */
/* parameter checking. */
/* */
/* Input: */
/* PLLPtr : PLL_B base address for this driver. */
/* Register : Select amount the PLL registers */
/* GetRegisterPtr : Result address for selected PLL register value */
/* */
/* Output: */
/* PLL_B_ERR_NONE : No error */
/* PLL_B_ERR_INVALID_HANDLE : PLL base address is zero. */
/* PLL_B_ERR_INVALID_DISABLE_CLOCKOUT : Invalid Disable clockout */
/**********************************************************************/
#define PLL_B_ControlVCOOutput( \
PLLPtr, \
DisableClockoutValue, \
) \
( \
(PLL_B_PARAM_CHECKING) ? \
( \
((PLLPtr) == NULL) ? \
PLL_B_ERR_INVALID_HANDLE : \
\
((DisableClockoutValue < PLL_B_CLOCK_OUT_ENABLE) \
|| (DisableClockoutValue > PLL_B_CLOCK_OUT_DISABLE))? \
PLL_B_ERR_INVALID_DISABLE_CLOCKOUT: \
\
PLL_B_ControlVCOOutput_f( (PLLPtr), \
(DisableClockoutValue) \
) \
) \
: \
PLL_B_ControlVCOOutput_f( (PLLPtr), \
(DisableClockoutValue) \
) \
\
) /* end of PLL_B_ControlVCOOutput Macro */
/**********************************************************************/
/* Macro: PLL_B_GetRegister */
/* */
/* Purpose: Call PLL_B_GetRegister_f function with optional */
/* parameter checking. */
/* */
/* Input: */
/* PLLPtr : PLL_B base address for this driver. */
/* Register : Select amount the PLL registers */
/* GetRegisterPtr : Result address for selected PLL register value */
/* */
/* Output: */
/* PLL_B_ERR_NONE : No error */
/* PLL_B_ERR_INVALID_HANDLE : PLL base address is zero. */
/* PLL_B_ERR_INVALID_REGISTER : PLL Register Selection is invalid.*/
/* PLL_B_ERR_BAD_RESULT_ADDR : Result pointer is zero. */
/**********************************************************************/
#define PLL_B_GetRegister( PLLPtr, \
Register, \
GetRegisterPtr \
) \
( \
(PLL_B_PARAM_CHECKING) ? \
( \
((PLLPtr) == NULL) ? \
PLL_B_ERR_INVALID_HANDLE : \
((GetRegisterPtr) == NULL) ? \
PLL_B_ERR_BAD_RESULT_ADDR : \
((Register < PLL_B_SYNCR) || \
(Register > PLL_B_SYNSR)) ? \
PLL_B_ERR_INVALID_REGISTER : \
PLL_B_GetRegister_f ((PLLPtr), \
(Register), \
(GetRegisterPtr)) \
) \
: \
PLL_B_GetRegister_f ( (PLLPtr), \
(Register), \
(GetRegisterPtr)) \
\
) /* end of PLL_B_GetRegister Macro */
/**********************************************************************/
/* Macro: PLL_B_SetRegister */
/* */
/* Purpose: Call PLL_B_SetRegister_f function with optional */
/* parameter checking. */
/* */
/* Input: */
/* PLLPtr : PLL_B base address for this driver. */
/* SetRegisterValue : Data to copy into selected PLL Register. */
/* */
/* Output: */
/* PLL_B_ERR_NONE : No error */
/* PLL_B_ERR_INVALID_HANDLE : PLL base address is zero. */
/**********************************************************************/
#define PLL_B_SetRegister( PLLPtr, \
SetRegisterValue \
) \
( \
(PLL_B_PARAM_CHECKING) ? \
( \
((PLLPtr == NULL) ? \
PLL_B_ERR_INVALID_HANDLE: \
PLL_B_SetRegister_f( (PLLPtr), \
(SetRegisterValue) )) \
) \
: \
PLL_B_SetRegister_f( (PLLPtr), \
(SetRegisterValue) ) \
) /* end of PLL_B_SetRegister Macro */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -