2.18 Comparator with DAC (CMP DAC)

This Plib implements software abstraction for CMP DAC Peripheral.

Library Interface

Comparator with DAC peripheral library provides the following interfaces:

Functions

NameDescription
CMPx_InitializeInitializes CMPx module of the device
CMPx_DeinitializeDeinitializes the CMPx module of the device to POR values
CMPx_CalibrateCalibrates the CMPx module and enables ripple reduction mode
CMPx_StatusGetReturns the output status of a comparator
CMPx_EnableEnables the common DAC module
CMPx_DisableDisables the common DAC module
CMPx_DACEnableEnables the individual DAC module
CMPx_DACDisableDisables the individual DAC module
CMPx_DACDataWriteWrites DAC data to register
CMPx_DACDataHighWriteSets higher limit of the slope
CMPx_DACDataLowWriteSets lower limit of the slope
CMPx_DACSlopeWriteSets slope rate
CMPx_DACSlopeUpdateModeSets slope rateUpdates slope modes specified in CMP_DAC_SLOPE_UPDATE_MODE

Data types and constants

NameTypeDescription
CMP_DAC_SLOPE_UPDATE_MODEEnumCMP slope data registers update mode
CMP_CALLBACKTypedefDefines the function pointer data type and function signature for the CMP callback function
Note: Not all APIs maybe implemented. See the specific device family section for available APIs.