1.29.21.3 RTC_Timer32Compare0HasMatched Function

C

bool RTC_Timer32Compare0HasMatched ( 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, if compare match has occurred and False otherwise.

Example

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

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

Remarks

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