G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Operation on comparator instance

Functions

__STATIC_INLINE void DDL_COMP_Enable (COMP_TypeDef *COMPx)
 Enable comparator instance.
__STATIC_INLINE void DDL_COMP_Disable (COMP_TypeDef *COMPx)
 Disable comparator instance.
__STATIC_INLINE uint32_t DDL_COMP_IsEnabled (COMP_TypeDef *COMPx)
 Get comparator enable state.
__STATIC_INLINE void DDL_COMP_Lock (COMP_TypeDef *COMPx)
 Lock comparator instance.
__STATIC_INLINE uint32_t DDL_COMP_IsLocked (COMP_TypeDef *COMPx)
 Get comparator lock state.
__STATIC_INLINE uint32_t DDL_COMP_ReadOutputLevel (COMP_TypeDef *COMPx)
 Read comparator output level.

Detailed Description

Function Documentation

◆ DDL_COMP_Disable()

__STATIC_INLINE void DDL_COMP_Disable ( COMP_TypeDef * COMPx)

Disable comparator instance.

Parameters
COMPxCOMP instance.
Return values
None

Definition at line 518 of file g32r4xx_ddl_comp.h.

◆ DDL_COMP_Enable()

__STATIC_INLINE void DDL_COMP_Enable ( COMP_TypeDef * COMPx)

Enable comparator instance.

Parameters
COMPxCOMP instance.
Return values
None
Note
After enable from off state, comparator startup time is needed.

Definition at line 508 of file g32r4xx_ddl_comp.h.

◆ DDL_COMP_IsEnabled()

__STATIC_INLINE uint32_t DDL_COMP_IsEnabled ( COMP_TypeDef * COMPx)

Get comparator enable state.

Parameters
COMPxCOMP instance.
Return values
Stateof bit (1 or 0).
  • 0: comparator instance is disabled.
  • 1: comparator instance is enabled.

Definition at line 530 of file g32r4xx_ddl_comp.h.

◆ DDL_COMP_IsLocked()

__STATIC_INLINE uint32_t DDL_COMP_IsLocked ( COMP_TypeDef * COMPx)

Get comparator lock state.

Parameters
COMPxCOMP instance.
Return values
Stateof bit (1 or 0).
  • 0: comparator instance is unlocked.
  • 1: comparator instance is locked.

Definition at line 554 of file g32r4xx_ddl_comp.h.

◆ DDL_COMP_Lock()

__STATIC_INLINE void DDL_COMP_Lock ( COMP_TypeDef * COMPx)

Lock comparator instance.

Parameters
COMPxCOMP instance.
Return values
None
Note
Once locked, comparator configuration can no longer be modified until next reset.
The only way to unlock the comparator is a device hardware reset.

Definition at line 542 of file g32r4xx_ddl_comp.h.

◆ DDL_COMP_ReadOutputLevel()

__STATIC_INLINE uint32_t DDL_COMP_ReadOutputLevel ( COMP_TypeDef * COMPx)

Read comparator output level.

Parameters
COMPxCOMP instance.
Return values
Returnedvalue can be one of the following values:
Note
The comparator output level depends on the selected polarity. If the polarity is not inverted:
  • Comparator output is low level when the input plus is lower than the input minus.
  • Comparator output is high level when the input plus is higher than the input minus. If the polarity is inverted:
  • Comparator output is high level when the input plus is lower than the input minus.
  • Comparator output is low level when the input plus is higher than the input minus.

Definition at line 573 of file g32r4xx_ddl_comp.h.