Output Compare Driver Library for Harmony v2

This module describes the basic architecture of the MPLAB® 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 the MPLAB 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 Name Description
DRV_OCn_Disable Disables the Output Compare instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_Enable Enables the Output Compare for the specified driver index. ('n' represents the instance of the Output Compare driver used.)
DRV_OCn_FaultHasOccurred Checks if a Fault has occurred for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_Initialize Initializes the Comparator instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_Start Starts the Comparator instance for the specified driver index. ('n' represents the instance of the Comparator driver used.)
DRV_OCn_Stop Stops 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.