1.17.12.6 OCMPx_CompareValueGet Function

C

/* x = OCMP instance number */

uint32_t OCMPx_CompareValueGet (void)

Summary

Reads the compare value. Based on OC32 bit, compare value will be 16-bit or 32-bit. Refer the generated header file for the exact function signature.

Description

This function reads the value of the compare register

Precondition

OCMPx_Initialize() function must have been called first.

Parameters

void

Returns

uint32_t - Compare register value

Example

uint32_t compare;
OCMP1_Initialize();
OCMP1_Enable();
compare = OCMP1_CompareValueGet();

Remarks

Based on OC32 bit, compare value will be 16-bit or 32-bit. Refer the generated header file for the exact function signature.