HT32SX Monarch Scan
Monarch Scan application for HT32SX
rtc.c File Reference

: This file provides code for the configuration of the RTC instances. More...

#include "rtc.h"

Functions

void MX_RTC_Init (void)
 
void HAL_RTC_MspInit (RTC_HandleTypeDef *rtcHandle)
 
void HAL_RTC_MspDeInit (RTC_HandleTypeDef *rtcHandle)
 
void Configure_RTC_Clock (void)
 Configure RTC Clock used at RF API. More...
 
void setRtcInUseFlag (uint8_t rtcInUse)
 Set a logic value corresponding to the RTC state. 1 if it's being used. More...
 
void setRtcIrqFlag (uint8_t rtcIrq)
 Set RTC IRQ flag. More...
 
void setRtcInUseForCsFlag (uint8_t rtcInUseForCs)
 Set RTC in use for CS flag. More...
 
void setNextRtcWakeUpFlag (uint32_t nextRtcWakeUp)
 Set Next RTC wake up flag. More...
 
void setRtcPrescFlag (uint16_t rtcPresc)
 Set RTC prescale flag. More...
 
uint32_t getNextRtcWakeUpFlag (void)
 Get RTC next wake up flag. More...
 
uint8_t getRtcInUseForCsFlag (void)
 Get RTC in use for CS flag. More...
 
uint8_t getRtcIrqFlag (void)
 Get RTC IRQ flag. More...
 
uint8_t getRtcInUseFlag (void)
 Get RTC in use flag. More...
 
uint16_t getRtcPrescFlag (void)
 Get RTC prescale flag. More...
 
RTC_HandleTypeDef * getRtcHandler (void)
 Get the currently RTC handler. More...
 

Variables

RTC_HandleTypeDef hrtc
 

Detailed Description

: This file provides code for the configuration of the RTC instances.

Attention

© Copyright (c) 2019 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Function Documentation

◆ Configure_RTC_Clock()

void Configure_RTC_Clock ( void  )

Configure RTC Clock used at RF API.


Parameters
[in]none
[out]none
Return values
none

◆ getNextRtcWakeUpFlag()

uint32_t getNextRtcWakeUpFlag ( void  )

Get RTC next wake up flag.


Parameters
[in]none
[out]none
Return values
next_rtc_wakeup

◆ getRtcHandler()

RTC_HandleTypeDef* getRtcHandler ( void  )

Get the currently RTC handler.


Parameters
[in]none
[out]none
Return values
&hrtcRTC handler address

◆ getRtcInUseFlag()

uint8_t getRtcInUseFlag ( void  )

Get RTC in use flag.


Parameters
[in]none
[out]none
Return values
rtc_in_use1 it's being used, else 0

◆ getRtcInUseForCsFlag()

uint8_t getRtcInUseForCsFlag ( void  )

Get RTC in use for CS flag.


Parameters
[in]none
[out]none
Return values
rtc_in_use_for_cs

◆ getRtcIrqFlag()

uint8_t getRtcIrqFlag ( void  )

Get RTC IRQ flag.


Parameters
[in]none
[out]none
Return values
rtc_irq1 or 0

◆ getRtcPrescFlag()

uint16_t getRtcPrescFlag ( void  )

Get RTC prescale flag.


Parameters
[in]none
[out]none
Return values
rtc_presc

◆ MX_RTC_Init()

void MX_RTC_Init ( void  )

Initialize RTC Only

Initialize RTC and set the Time and Date

Enable the WakeUp

◆ setNextRtcWakeUpFlag()

void setNextRtcWakeUpFlag ( uint32_t  nextRtcWakeUp)

Set Next RTC wake up flag.


Parameters
[in]nextRtcWakeUp
[out]none
Return values
none

◆ setRtcInUseFlag()

void setRtcInUseFlag ( uint8_t  rtcInUse)

Set a logic value corresponding to the RTC state. 1 if it's being used.


Parameters
[in]rtcInUse1 it's being used, else 0
[out]none
Return values
none

◆ setRtcInUseForCsFlag()

void setRtcInUseForCsFlag ( uint8_t  rtcInUseForCs)

Set RTC in use for CS flag.


Parameters
[in]rtcInUseForCs1 it's being used, else 0
[out]none
Return values
none

◆ setRtcIrqFlag()

void setRtcIrqFlag ( uint8_t  rtcIrq)

Set RTC IRQ flag.


Parameters
[in]rtcIrq1 or 0
[out]none
Return values
none

◆ setRtcPrescFlag()

void setRtcPrescFlag ( uint16_t  rtcPresc)

Set RTC prescale flag.


Parameters
[in]rtcPresc
[out]none
Return values
none