1.10.15.6 1.11.16.6 1.12.16.6 1.13.15.6 1.16.12.6 1.17.12.6 1.18.12.6 1.19.12.6 1.20.12.6 1.21.13.6 1.22.17.6 1.23.16.6 1.24.14.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.