Output Compare Driver Library for Harmony v2

This module describes the basic architecture of theMPLAB® Harmony Output Compare (OC) Driver Library and provides information and examples on its use.

Library Overview

The Output Compare Static Driver provides a high-level interface to manage the Output Compare module on the Microchip family of microcontrollers. Through theMPLAB Harmony Configurator (MHC), this driver provides Application Programming Interfaces (APIs) for the following:

  • Initializing the module
  • Enabling/Disabling the Output Compare Module
  • Starting/Stopping the Output Compare Module
  • Fault checking

Library Interface

This section describes the API functions of the Output Compare Driver Library.
Function NameDescription
DRV_OCn_DisableDisables the Output Compare instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_EnableEnables the Output Compare for the specified driver index. ('n' represents the instance of the Output Compare driver used.)
DRV_OCn_FaultHasOccurredChecks if a Fault has occurred for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_InitializeInitializes the Comparator instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_StartStarts the Comparator instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_StopStops the Output Compare instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)

Only static implementation is supported for the Output Compare Driver Library.