MTB CAT1 Peripheral driver library

General Description

Functions

void Cy_RTC_Interrupt (cy_stc_rtc_dst_t const *dstTime, bool mode)
 The interrupt handler function which should be called in user provided RTC interrupt function. More...
 
void Cy_RTC_Alarm1Interrupt (void)
 A blank weak interrupt handler function which indicates assert of the RTC alarm 1 interrupt. More...
 
void Cy_RTC_Alarm2Interrupt (void)
 A blank weak interrupt handler function which indicates assert of the RTC alarm 2 interrupt. More...
 
void Cy_RTC_DstInterrupt (cy_stc_rtc_dst_t const *dstTime)
 This is a processing handler against the DST event. More...
 
void Cy_RTC_CenturyInterrupt (void)
 This is a weak function and it should be redefined in user source code in condition that such event handler is required. More...
 
uint32_t Cy_RTC_GetInterruptStatus (void)
 Returns a status of RTC interrupt requests. More...
 
uint32_t Cy_RTC_GetInterruptStatusMasked (void)
 Returns an interrupt request register masked by the interrupt mask. More...
 
uint32_t Cy_RTC_GetInterruptMask (void)
 Returns an interrupt mask. More...
 
void Cy_RTC_ClearInterrupt (uint32_t interruptMask)
 Clears RTC interrupts by setting each bit. More...
 
void Cy_RTC_SetInterrupt (uint32_t interruptMask)
 Sets a software interrupt request. More...
 
void Cy_RTC_SetInterruptMask (uint32_t interruptMask)
 Configures which bits of the interrupt request register that triggers an interrupt event. More...
 

Function Documentation

◆ Cy_RTC_Interrupt()

void Cy_RTC_Interrupt ( cy_stc_rtc_dst_t const *  dstTime,
bool  mode 
)

The interrupt handler function which should be called in user provided RTC interrupt function.

This is the handler of the RTC interrupt in CPU NVIC. The handler checks which RTC interrupt was asserted and calls the respective RTC interrupt handler functions: Cy_RTC_Alarm1Interrupt(), Cy_RTC_Alarm2Interrupt() or Cy_RTC_DstInterrupt(), and Cy_RTC_CenturyInterrupt().

The order of the RTC handler functions execution is incremental. Cy_RTC_Alarm1Interrupt() is run as the first one and Cy_RTC_CenturyInterrupt() is called as the last one.

This function clears the RTC interrupt every time when it is called.

Cy_RTC_DstInterrupt() function is called instead of Cy_RTC_Alarm2Interrupt() in condition that the mode parameter is true.

Parameters
dstTimeThe daylight saving time configuration structure, see cy_stc_rtc_dst_t.
modeFalse - if the DST is disabled. True - if DST is enabled.
Note
This function is required to be called in user interrupt handler.

◆ Cy_RTC_Alarm1Interrupt()

void Cy_RTC_Alarm1Interrupt ( void  )

A blank weak interrupt handler function which indicates assert of the RTC alarm 1 interrupt.

Function implementation should be defined in user source code in condition that such event handler is required. If such event is not required user should not do any actions.

This function is called in the general RTC interrupt handler Cy_RTC_Interrupt() function.

◆ Cy_RTC_Alarm2Interrupt()

void Cy_RTC_Alarm2Interrupt ( void  )

A blank weak interrupt handler function which indicates assert of the RTC alarm 2 interrupt.

Function implementation should be defined in user source code in condition that such event handler is required. If such event is not required user should not do any actions.

This function is called in the general RTC interrupt handler Cy_RTC_Interrupt() function. Cy_RTC_Alarm2Interrupt() function is ignored in Cy_RTC_Interrupt() function if DST is enabled. Refer to Cy_RTC_Interrupt() description.

◆ Cy_RTC_DstInterrupt()

void Cy_RTC_DstInterrupt ( cy_stc_rtc_dst_t const *  dstTime)

This is a processing handler against the DST event.

It adjusts the current time using the DST start/stop parameters and registers the next DST event time into the ALARM2 interrupt. This function is already called by Cy_RTC_Interrupt().

Parameters
dstTimeThe DST configuration structure, see cy_stc_rtc_dst_t.

◆ Cy_RTC_CenturyInterrupt()

void Cy_RTC_CenturyInterrupt ( void  )

This is a weak function and it should be redefined in user source code in condition that such event handler is required.

By calling this function, it indicates the year reached 2100.

Function implementation should be defined in user source code in condition that such event handler is required. If such event is not required user should not do any actions.

◆ Cy_RTC_GetInterruptStatus()

uint32_t Cy_RTC_GetInterruptStatus ( void  )

Returns a status of RTC interrupt requests.

Returns
Bit mapping information, see RTC Interrupt sources.

◆ Cy_RTC_GetInterruptStatusMasked()

uint32_t Cy_RTC_GetInterruptStatusMasked ( void  )

Returns an interrupt request register masked by the interrupt mask.

Returns a result of the bitwise AND operation between the corresponding interrupt request and mask bits.

Returns
Bit mapping information, see RTC Interrupt sources.

◆ Cy_RTC_GetInterruptMask()

uint32_t Cy_RTC_GetInterruptMask ( void  )

Returns an interrupt mask.

Returns
Bit mapping information, see RTC Interrupt sources.

◆ Cy_RTC_ClearInterrupt()

void Cy_RTC_ClearInterrupt ( uint32_t  interruptMask)

Clears RTC interrupts by setting each bit.

Parameters
interruptMaskThe bit mask of interrupts to set, see RTC Interrupt sources.

◆ Cy_RTC_SetInterrupt()

void Cy_RTC_SetInterrupt ( uint32_t  interruptMask)

Sets a software interrupt request.

Parameters
interruptMaskBit mask, see RTC Interrupt sources.

◆ Cy_RTC_SetInterruptMask()

void Cy_RTC_SetInterruptMask ( uint32_t  interruptMask)

Configures which bits of the interrupt request register that triggers an interrupt event.

Parameters
interruptMaskThe bit mask of interrupts to set, see RTC Interrupt sources.