Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

High Speed Analog Comparator with Slope Compensation DAC driver using dsPIC MCUs. More...

+ Collaboration diagram for CMP DAC Driver:

Files

file  cmp1.h
 This is the generated driver header file for the CMP1 driver.
 
file  cmp2.h
 This is the generated driver header file for the CMP2 driver.
 
file  cmp3.h
 This is the generated driver header file for the CMP3 driver.
 
file  cmp1.c
 This is the generated driver source file for CMP1 driver.
 
file  cmp2.c
 This is the generated driver source file for CMP2 driver.
 
file  cmp3.c
 This is the generated driver source file for CMP3 driver.
 

Data Structures

struct  DAC_DC_INTERFACE
 Structure containing the function pointers of DAC driver in DC mode. More...
 
struct  CMP_INTERFACE
 Structure containing the function pointers of CMP driver. More...
 

Macros

#define CMP_ISEC_SC_Initialize   CMP1_Initialize
 This macro defines the Custom Name for CMP1_Initialize API.
 
#define CMP_ISEC_SC_Deinitialize   CMP1_Deinitialize
 This macro defines the Custom Name for CMP1_Deinitialize API.
 
#define CMP_ISEC_SC_StatusGet   CMP1_StatusGet
 This macro defines the Custom Name for CMP1_StatusGet API.
 
#define CMP_ISEC_SC_Enable   CMP1_Enable
 This macro defines the Custom Name for CMP1_Enable API.
 
#define CMP_ISEC_SC_Disable   CMP1_Disable
 This macro defines the Custom Name for CMP1_Disable API.
 
#define CMP_ISEC_SC_DACEnable   CMP1_DACEnable
 This macro defines the Custom Name for CMP1_DACEnable API.
 
#define CMP_ISEC_SC_DACDisable   CMP1_DACDisable
 This macro defines the Custom Name for CMP1_DACDisable API.
 
#define CMP_ISEC_SC_DACDisable   CMP1_DACDisable
 This macro defines the Custom Name for CMP1_DACDisable API.
 
#define CMP_ISEC_SC_DACDataWrite   CMP1_DACDataWrite
 This macro defines the Custom Name for CMP1_DACDataWrite API.
 
#define CMP_ISEC_SC_EventCallbackRegister   CMP1_EventCallbackRegister
 This macro defines the Custom Name for CMP1_EventCallbackRegister API.
 
#define CMP_ISEC_SC_Tasks   CMP1_Tasks
 This macro defines the Custom Name for CMP1_Tasks API.
 
#define DAC_DEBUG_Initialize   CMP2_Initialize
 This macro defines the Custom Name for CMP2_Initialize API.
 
#define DAC_DEBUG_Deinitialize   CMP2_Deinitialize
 This macro defines the Custom Name for CMP2_Deinitialize API.
 
#define DAC_DEBUG_StatusGet   CMP2_StatusGet
 This macro defines the Custom Name for CMP2_StatusGet API.
 
#define DAC_DEBUG_Enable   CMP2_Enable
 This macro defines the Custom Name for CMP2_Enable API.
 
#define DAC_DEBUG_Disable   CMP2_Disable
 This macro defines the Custom Name for CMP2_Disable API.
 
#define DAC_DEBUG_DACEnable   CMP2_DACEnable
 This macro defines the Custom Name for CMP2_DACEnable API.
 
#define DAC_DEBUG_DACDisable   CMP2_DACDisable
 This macro defines the Custom Name for CMP2_DACDisable API.
 
#define DAC_DEBUG_DACDisable   CMP2_DACDisable
 This macro defines the Custom Name for CMP2_DACDisable API.
 
#define DAC_DEBUG_DACDataWrite   CMP2_DACDataWrite
 This macro defines the Custom Name for CMP2_DACDataWrite API.
 
#define DAC_DEBUG_EventCallbackRegister   CMP2_EventCallbackRegister
 This macro defines the Custom Name for CMP2_EventCallbackRegister API.
 
#define DAC_DEBUG_Tasks   CMP2_Tasks
 This macro defines the Custom Name for CMP2_Tasks API.
 
#define CMP_IPRI_SC_Initialize   CMP3_Initialize
 This macro defines the Custom Name for CMP3_Initialize API.
 
#define CMP_IPRI_SC_Deinitialize   CMP3_Deinitialize
 This macro defines the Custom Name for CMP3_Deinitialize API.
 
#define CMP_IPRI_SC_StatusGet   CMP3_StatusGet
 This macro defines the Custom Name for CMP3_StatusGet API.
 
#define CMP_IPRI_SC_Enable   CMP3_Enable
 This macro defines the Custom Name for CMP3_Enable API.
 
#define CMP_IPRI_SC_Disable   CMP3_Disable
 This macro defines the Custom Name for CMP3_Disable API.
 
#define CMP_IPRI_SC_DACEnable   CMP3_DACEnable
 This macro defines the Custom Name for CMP3_DACEnable API.
 
#define CMP_IPRI_SC_DACDisable   CMP3_DACDisable
 This macro defines the Custom Name for CMP3_DACDisable API.
 
#define CMP_IPRI_SC_DACDisable   CMP3_DACDisable
 This macro defines the Custom Name for CMP3_DACDisable API.
 
#define CMP_IPRI_SC_DACDataWrite   CMP3_DACDataWrite
 This macro defines the Custom Name for CMP3_DACDataWrite API.
 
#define CMP_IPRI_SC_EventCallbackRegister   CMP3_EventCallbackRegister
 This macro defines the Custom Name for CMP3_EventCallbackRegister API.
 
#define CMP_IPRI_SC_Tasks   CMP3_Tasks
 This macro defines the Custom Name for CMP3_Tasks API.
 

Functions

void CMP1_Initialize (void)
 Initialize the CMP1 module.
 
void CMP1_Deinitialize (void)
 Deinitializes the CMP1 to POR values.
 
bool CMP1_StatusGet (void)
 Returns the comparator output status.
 
void CMP1_Enable (void)
 Enables the common DAC module.
 
void CMP1_Disable (void)
 Disables the common DAC module.
 
void CMP1_DACEnable (void)
 Enables the individual DAC module.
 
void CMP1_DACDisable (void)
 Disables the individual DAC module.
 
void CMP1_DACDataWrite (size_t value)
 CMP DAC Data write to register.
 
void CMP1_EventCallbackRegister (void(*handler)(void))
 This function can be used to override default callback and to define custom callback for CMP1 Event event.
 
void CMP1_EventCallback (void)
 This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using
CMP1_EventCallbackRegister.
 
void CMP1_Tasks (void)
 The Task function can be called in the main application using the High Speed Comparator, when interrupts are not used. This would thus introduce the polling mode feature of the Analog Comparator.
 
void CMP2_Initialize (void)
 Initialize the CMP2 module.
 
void CMP2_Deinitialize (void)
 Deinitializes the CMP2 to POR values.
 
bool CMP2_StatusGet (void)
 Returns the comparator output status.
 
void CMP2_Enable (void)
 Enables the common DAC module.
 
void CMP2_Disable (void)
 Disables the common DAC module.
 
void CMP2_DACEnable (void)
 Enables the individual DAC module.
 
void CMP2_DACDisable (void)
 Disables the individual DAC module.
 
void CMP2_DACDataWrite (size_t value)
 CMP DAC Data write to register.
 
void CMP2_EventCallbackRegister (void(*handler)(void))
 This function can be used to override default callback and to define custom callback for CMP2 Event event.
 
void CMP2_EventCallback (void)
 This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using
CMP2_EventCallbackRegister.
 
void CMP2_Tasks (void)
 The Task function can be called in the main application using the High Speed Comparator, when interrupts are not used. This would thus introduce the polling mode feature of the Analog Comparator.
 
void CMP3_Initialize (void)
 Initialize the CMP3 module.
 
void CMP3_Deinitialize (void)
 Deinitializes the CMP3 to POR values.
 
bool CMP3_StatusGet (void)
 Returns the comparator output status.
 
void CMP3_Enable (void)
 Enables the common DAC module.
 
void CMP3_Disable (void)
 Disables the common DAC module.
 
void CMP3_DACEnable (void)
 Enables the individual DAC module.
 
void CMP3_DACDisable (void)
 Disables the individual DAC module.
 
void CMP3_DACDataWrite (size_t value)
 CMP DAC Data write to register.
 
void CMP3_EventCallbackRegister (void(*handler)(void))
 This function can be used to override default callback and to define custom callback for CMP3 Event event.
 
void CMP3_EventCallback (void)
 This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using
CMP3_EventCallbackRegister.
 
void CMP3_Tasks (void)
 The Task function can be called in the main application using the High Speed Comparator, when interrupts are not used. This would thus introduce the polling mode feature of the Analog Comparator.
 

Variables

const struct CMP_INTERFACE CMP_ISEC_SC
 Structure object of type CMP_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. CMP_DAC1 can be changed by the user in the CMP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
 
const struct CMP_INTERFACE DAC_DEBUG
 Structure object of type CMP_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. CMP_DAC1 can be changed by the user in the CMP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
 
const struct CMP_INTERFACE CMP_IPRI_SC
 Structure object of type CMP_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. CMP_DAC1 can be changed by the user in the CMP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
 

Detailed Description

Macro Definition Documentation

◆ CMP_IPRI_SC_DACDataWrite

#define CMP_IPRI_SC_DACDataWrite   CMP3_DACDataWrite

Definition at line 100 of file cmp3.h.

◆ CMP_IPRI_SC_DACDisable [1/2]

#define CMP_IPRI_SC_DACDisable   CMP3_DACDisable

Definition at line 95 of file cmp3.h.

◆ CMP_IPRI_SC_DACDisable [2/2]

#define CMP_IPRI_SC_DACDisable   CMP3_DACDisable

Definition at line 95 of file cmp3.h.

◆ CMP_IPRI_SC_DACEnable

#define CMP_IPRI_SC_DACEnable   CMP3_DACEnable

Definition at line 90 of file cmp3.h.

◆ CMP_IPRI_SC_Deinitialize

#define CMP_IPRI_SC_Deinitialize   CMP3_Deinitialize

Definition at line 70 of file cmp3.h.

◆ CMP_IPRI_SC_Disable

#define CMP_IPRI_SC_Disable   CMP3_Disable

Definition at line 85 of file cmp3.h.

◆ CMP_IPRI_SC_Enable

#define CMP_IPRI_SC_Enable   CMP3_Enable

Definition at line 80 of file cmp3.h.

◆ CMP_IPRI_SC_EventCallbackRegister

#define CMP_IPRI_SC_EventCallbackRegister   CMP3_EventCallbackRegister

Definition at line 110 of file cmp3.h.

◆ CMP_IPRI_SC_Initialize

#define CMP_IPRI_SC_Initialize   CMP3_Initialize

Definition at line 65 of file cmp3.h.

◆ CMP_IPRI_SC_StatusGet

#define CMP_IPRI_SC_StatusGet   CMP3_StatusGet

Definition at line 75 of file cmp3.h.

◆ CMP_IPRI_SC_Tasks

#define CMP_IPRI_SC_Tasks   CMP3_Tasks

Definition at line 115 of file cmp3.h.

◆ CMP_ISEC_SC_DACDataWrite

#define CMP_ISEC_SC_DACDataWrite   CMP1_DACDataWrite

Definition at line 100 of file cmp1.h.

◆ CMP_ISEC_SC_DACDisable [1/2]

#define CMP_ISEC_SC_DACDisable   CMP1_DACDisable

Definition at line 95 of file cmp1.h.

◆ CMP_ISEC_SC_DACDisable [2/2]

#define CMP_ISEC_SC_DACDisable   CMP1_DACDisable

Definition at line 95 of file cmp1.h.

◆ CMP_ISEC_SC_DACEnable

#define CMP_ISEC_SC_DACEnable   CMP1_DACEnable

Definition at line 90 of file cmp1.h.

◆ CMP_ISEC_SC_Deinitialize

#define CMP_ISEC_SC_Deinitialize   CMP1_Deinitialize

Definition at line 70 of file cmp1.h.

◆ CMP_ISEC_SC_Disable

#define CMP_ISEC_SC_Disable   CMP1_Disable

Definition at line 85 of file cmp1.h.

◆ CMP_ISEC_SC_Enable

#define CMP_ISEC_SC_Enable   CMP1_Enable

Definition at line 80 of file cmp1.h.

◆ CMP_ISEC_SC_EventCallbackRegister

#define CMP_ISEC_SC_EventCallbackRegister   CMP1_EventCallbackRegister

Definition at line 110 of file cmp1.h.

◆ CMP_ISEC_SC_Initialize

#define CMP_ISEC_SC_Initialize   CMP1_Initialize

Definition at line 65 of file cmp1.h.

◆ CMP_ISEC_SC_StatusGet

#define CMP_ISEC_SC_StatusGet   CMP1_StatusGet

Definition at line 75 of file cmp1.h.

◆ CMP_ISEC_SC_Tasks

#define CMP_ISEC_SC_Tasks   CMP1_Tasks

Definition at line 115 of file cmp1.h.

◆ DAC_DEBUG_DACDataWrite

#define DAC_DEBUG_DACDataWrite   CMP2_DACDataWrite

Definition at line 100 of file cmp2.h.

◆ DAC_DEBUG_DACDisable [1/2]

#define DAC_DEBUG_DACDisable   CMP2_DACDisable

Definition at line 95 of file cmp2.h.

◆ DAC_DEBUG_DACDisable [2/2]

#define DAC_DEBUG_DACDisable   CMP2_DACDisable

Definition at line 95 of file cmp2.h.

◆ DAC_DEBUG_DACEnable

#define DAC_DEBUG_DACEnable   CMP2_DACEnable

Definition at line 90 of file cmp2.h.

◆ DAC_DEBUG_Deinitialize

#define DAC_DEBUG_Deinitialize   CMP2_Deinitialize

Definition at line 70 of file cmp2.h.

◆ DAC_DEBUG_Disable

#define DAC_DEBUG_Disable   CMP2_Disable

Definition at line 85 of file cmp2.h.

◆ DAC_DEBUG_Enable

#define DAC_DEBUG_Enable   CMP2_Enable

Definition at line 80 of file cmp2.h.

◆ DAC_DEBUG_EventCallbackRegister

#define DAC_DEBUG_EventCallbackRegister   CMP2_EventCallbackRegister

Definition at line 110 of file cmp2.h.

◆ DAC_DEBUG_Initialize

#define DAC_DEBUG_Initialize   CMP2_Initialize

Definition at line 65 of file cmp2.h.

◆ DAC_DEBUG_StatusGet

#define DAC_DEBUG_StatusGet   CMP2_StatusGet

Definition at line 75 of file cmp2.h.

◆ DAC_DEBUG_Tasks

#define DAC_DEBUG_Tasks   CMP2_Tasks

Definition at line 115 of file cmp2.h.

Function Documentation

◆ CMP1_DACDataWrite()

void CMP1_DACDataWrite ( size_t  value)
Parameters
[in]value- DAC Data write value
Returns
none

Definition at line 136 of file cmp1.c.

◆ CMP1_DACDisable()

void CMP1_DACDisable ( void  )
Parameters
none
Returns
none

Definition at line 131 of file cmp1.c.

◆ CMP1_DACEnable()

void CMP1_DACEnable ( void  )
Parameters
none
Returns
none

Definition at line 126 of file cmp1.c.

◆ CMP1_Deinitialize()

void CMP1_Deinitialize ( void  )
Parameters
none
Returns
none

Definition at line 91 of file cmp1.c.

◆ CMP1_Disable()

void CMP1_Disable ( void  )
Parameters
none
Returns
none

Definition at line 121 of file cmp1.c.

◆ CMP1_Enable()

void CMP1_Enable ( void  )
Parameters
none
Returns
none

Definition at line 116 of file cmp1.c.

◆ CMP1_EventCallback()

void CMP1_EventCallback ( void  )
Parameters
none
Returns
none
+ Here is the caller graph for this function:

◆ CMP1_EventCallbackRegister()

void CMP1_EventCallbackRegister ( void(*)(void)  handler)
Parameters
[in]handler- Address of the callback function.
Returns
none

Definition at line 141 of file cmp1.c.

+ Here is the caller graph for this function:

◆ CMP1_Initialize()

void CMP1_Initialize ( void  )
Parameters
none
Returns
none

Definition at line 69 of file cmp1.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CMP1_StatusGet()

bool CMP1_StatusGet ( void  )
Parameters
none
Returns
true - Comparator output is high
false - Comparator output is low

Definition at line 111 of file cmp1.c.

+ Here is the caller graph for this function:

◆ CMP1_Tasks()

void CMP1_Tasks ( void  )
Parameters
none
Returns
none

Definition at line 154 of file cmp1.c.

◆ CMP2_DACDataWrite()

void CMP2_DACDataWrite ( size_t  value)
Parameters
[in]value- DAC Data write value
Returns
none

Definition at line 136 of file cmp2.c.

◆ CMP2_DACDisable()

void CMP2_DACDisable ( void  )
Parameters
none
Returns
none

Definition at line 131 of file cmp2.c.

◆ CMP2_DACEnable()

void CMP2_DACEnable ( void  )
Parameters
none
Returns
none

Definition at line 126 of file cmp2.c.

◆ CMP2_Deinitialize()

void CMP2_Deinitialize ( void  )
Parameters
none
Returns
none

Definition at line 91 of file cmp2.c.

◆ CMP2_Disable()

void CMP2_Disable ( void  )
Parameters
none
Returns
none

Definition at line 121 of file cmp2.c.

◆ CMP2_Enable()

void CMP2_Enable ( void  )
Parameters
none
Returns
none

Definition at line 116 of file cmp2.c.

◆ CMP2_EventCallback()

void CMP2_EventCallback ( void  )
Parameters
none
Returns
none
+ Here is the caller graph for this function:

◆ CMP2_EventCallbackRegister()

void CMP2_EventCallbackRegister ( void(*)(void)  handler)
Parameters
[in]handler- Address of the callback function.
Returns
none

Definition at line 141 of file cmp2.c.

+ Here is the caller graph for this function:

◆ CMP2_Initialize()

void CMP2_Initialize ( void  )
Parameters
none
Returns
none

Definition at line 69 of file cmp2.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CMP2_StatusGet()

bool CMP2_StatusGet ( void  )
Parameters
none
Returns
true - Comparator output is high
false - Comparator output is low

Definition at line 111 of file cmp2.c.

◆ CMP2_Tasks()

void CMP2_Tasks ( void  )
Parameters
none
Returns
none

Definition at line 154 of file cmp2.c.

◆ CMP3_DACDataWrite()

void CMP3_DACDataWrite ( size_t  value)
Parameters
[in]value- DAC Data write value
Returns
none

Definition at line 136 of file cmp3.c.

◆ CMP3_DACDisable()

void CMP3_DACDisable ( void  )
Parameters
none
Returns
none

Definition at line 131 of file cmp3.c.

◆ CMP3_DACEnable()

void CMP3_DACEnable ( void  )
Parameters
none
Returns
none

Definition at line 126 of file cmp3.c.

◆ CMP3_Deinitialize()

void CMP3_Deinitialize ( void  )
Parameters
none
Returns
none

Definition at line 91 of file cmp3.c.

◆ CMP3_Disable()

void CMP3_Disable ( void  )
Parameters
none
Returns
none

Definition at line 121 of file cmp3.c.

◆ CMP3_Enable()

void CMP3_Enable ( void  )
Parameters
none
Returns
none

Definition at line 116 of file cmp3.c.

◆ CMP3_EventCallback()

void CMP3_EventCallback ( void  )
Parameters
none
Returns
none
+ Here is the caller graph for this function:

◆ CMP3_EventCallbackRegister()

void CMP3_EventCallbackRegister ( void(*)(void)  handler)
Parameters
[in]handler- Address of the callback function.
Returns
none

Definition at line 141 of file cmp3.c.

+ Here is the caller graph for this function:

◆ CMP3_Initialize()

void CMP3_Initialize ( void  )
Parameters
none
Returns
none

Definition at line 69 of file cmp3.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CMP3_StatusGet()

bool CMP3_StatusGet ( void  )
Parameters
none
Returns
true - Comparator output is high
false - Comparator output is low

Definition at line 111 of file cmp3.c.

+ Here is the caller graph for this function:

◆ CMP3_Tasks()

void CMP3_Tasks ( void  )
Parameters
none
Returns
none

Definition at line 154 of file cmp3.c.

Variable Documentation

◆ CMP_IPRI_SC

const struct CMP_INTERFACE CMP_IPRI_SC
extern

Definition at line 55 of file cmp3.c.

◆ CMP_ISEC_SC

const struct CMP_INTERFACE CMP_ISEC_SC
extern

Definition at line 55 of file cmp1.c.

◆ DAC_DEBUG

const struct CMP_INTERFACE DAC_DEBUG
extern

Definition at line 55 of file cmp2.c.