1.2.19.9 1.3.22.9 1.4.20.9 1.5.21.9 1.6.21.9 1.7.22.9 1.29.21.9 1.30.15.3 1.31.15.3 1.32.24.9 1.33.15.3 1.37.15.3 1.38.20.9 1.39.17.9 1.40.19.9 RTC_Timer32CompareHasMatched Function

C

bool RTC_Timer32CompareHasMatched ( void )

Summary

Check for 32-bit Timer Compare match

Description

This function returns true if the counter value has matched the configured 32-bit compare value.

Precondition

RTC_Initialize, RTC_Timer32Start and RTC_Timer32CompareSet must have been called for the associated RTC instance. The RTC peripheral should have been configured in 32-bit Timer Counter mode.

Parameters

None.

Returns

True, Compare match has occurred and False otherwise.

Example

bool compareHasMatched = false;
RTC_Initialize();
RTC_Timer32CompareSet(0x3000);
RTC_Timer32CounterSet(0);
RTC_Timer32Start();

// Wait until compare match
while(!RTC_Timer32CompareHasMatched();

Remarks

This API is available for devices that have only one compare register in 32-bit mode.