![]() |
M480 BSP V3.05.006
The Board Support Package for M480 Series
|
Macros | |
#define | OPA_POWER_ON(opa, u32OpaNum) |
This macro is used to power on the OPA circuit. More... | |
#define | OPA_POWER_DOWN(opa, u32OpaNum) |
This macro is used to power down the OPA circuit. More... | |
#define | OPA_ENABLE_SCH_TRIGGER(opa, u32OpaNum) |
This macro is used to enable the OPA Schmitt trigger buffer. More... | |
#define | OPA_DISABLE_SCH_TRIGGER(opa, u32OpaNum) |
This macro is used to disable the OPA Schmitt trigger buffer. More... | |
#define | OPA_ENABLE_INT(opa, u32OpaNum) |
This macro is used to enable OPA Schmitt trigger digital output interrupt. More... | |
#define | OPA_DISABLE_INT(opa, u32OpaNum) |
This macro is used to disable OPA Schmitt trigger digital output interrupt. More... | |
#define | OPA_GET_DIGITAL_OUTPUT(opa, u32OpaNum) |
This macro is used to get OPA digital output state. More... | |
#define | OPA_GET_INT_FLAG(opa, u32OpaNum) |
This macro is used to get OPA interrupt flag. More... | |
#define | OPA_CLR_INT_FLAG(opa, u32OpaNum) |
This macro is used to clear OPA interrupt flag. More... | |
#define | OPA_Reset() |
This macro is used to generate asynchronous reset signals to OPA controller. More... | |
Functions | |
__STATIC_INLINE int32_t | OPA_Calibration (OPA_T *opa, uint32_t u32OpaNum, uint32_t u32ClockSel, uint32_t u32RefVol) |
This function is used to configure and start OPA calibration. More... | |
#define OPA_CLR_INT_FLAG | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to clear OPA interrupt flag.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will write 1 to OPDFx (x=0,1) bit of OPASR register to clear interrupt flag.
#define OPA_DISABLE_INT | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to disable OPA Schmitt trigger digital output interrupt.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will clear OPDIEx (x=0, 1) bit of OPACR register to disable the OPA Schmitt trigger digital output interrupt.
#define OPA_DISABLE_SCH_TRIGGER | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to disable the OPA Schmitt trigger buffer.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will clear OPSCHx_EN (x=0, 1) bit of OPACR register to disable the OPA Schmitt trigger buffer.
#define OPA_ENABLE_INT | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to enable OPA Schmitt trigger digital output interrupt.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will set OPDIEx (x=0, 1) bit of OPACR register to enable the OPA Schmitt trigger digital output interrupt.
#define OPA_ENABLE_SCH_TRIGGER | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to enable the OPA Schmitt trigger buffer.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will set OPSCHx_EN (x=0, 1) bit of OPACR register to enable the OPA Schmitt trigger buffer.
#define OPA_GET_DIGITAL_OUTPUT | ( | opa, | |
u32OpaNum | |||
) |
#define OPA_GET_INT_FLAG | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to get OPA interrupt flag.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
0 | OPA interrupt does not occur. |
1 | OPA interrupt occurs. |
This macro will return the ACMP interrupt flag.
#define OPA_POWER_DOWN | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to power down the OPA circuit.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will clear OPx_EN (x=0, 1) bit of OPACR register to power down the OPA circuit.
#define OPA_POWER_ON | ( | opa, | |
u32OpaNum | |||
) |
This macro is used to power on the OPA circuit.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
This macro will set OPx_EN (x=0, 1) bit of OPACR register to power on the OPA circuit.
#define OPA_Reset | ( | ) |
__STATIC_INLINE int32_t OPA_Calibration | ( | OPA_T * | opa, |
uint32_t | u32OpaNum, | ||
uint32_t | u32ClockSel, | ||
uint32_t | u32RefVol | ||
) |
This function is used to configure and start OPA calibration.
[in] | opa | The pointer of the specified OPA module |
[in] | u32OpaNum | The OPA number. 0 for OPA0; 1 for OPA1; 2 for OPA2. |
[in] | u32ClockSel | Select OPA calibration clock |
[in] | u32RefVol | Select OPA reference voltage |
0 | PMOS and NMOS calibration successfully. |
-1 | only PMOS calibration failed. |
-2 | only NMOS calibration failed. |
-3 | PMOS and NMOS calibration failed. |