GlobLib
HAL and API libraries for MCUs and hardware.
stm32f103cb_rtc.h
Go to the documentation of this file.
1 #ifndef STM32F103CB_RTC_H_
2 #define STM32F103CB_RTC_H_
3 
59 #include "stm32f103cb_debug.h"
60 #include "stm32f103cb_systick.h"
61 #include <libopencm3/stm32/rtc.h>
62 #include <stdint.h>
63 
81 mcu_error RTC_setup(uint32_t resolution);
97 mcu_error RTC_calibrate(uint32_t resolution);
109 mcu_error RTC_setPrescaler(uint32_t resolution);
118 uint8_t RTC_isAlarmEnabled(void);
127 uint8_t RTC_isOverflowEnabled(void);
136 uint8_t RTC_isResolutionEnabled(void);
141 uint32_t RTC_getCount(void);
146 void RTC_setCount(uint32_t count);
152 void RTC_enableResolutionISR(void (*res_isr)(void));
160 void RTC_enableAlarmISR(uint32_t count, void (*al_isr)(void));
166 void RTC_enableOverflowISR(void (*ov_isr)(void));
170 void RTC_disableResolutionISR(void);
174 void RTC_disableAlarmISR(void);
178 void RTC_disableOverflowISR(void);
184 void RTC_clockEnable(void);
185 
188 #endif
uint32_t RTC_getCount(void)
Get the current count value.
Header file for stm32f103cb DEBUG.
mcu_error RTC_setPrescaler(uint32_t resolution)
Set the raw prescaler value of the RTC.
void RTC_clockEnable(void)
Enable the RTC clock.
uint8_t RTC_isOverflowEnabled(void)
Determine if the overflow interrupt is enabled.
void RTC_setCount(uint32_t count)
Set the current count value.
uint8_t RTC_isResolutionEnabled(void)
Determine if the resolution (second) interrupt is enabled.
void RTC_disableAlarmISR(void)
disables the alarm ISR.
void RTC_enableAlarmISR(uint32_t count, void(*al_isr)(void))
Enables the alarm ISR.
void RTC_disableResolutionISR(void)
disables the resolution ISR.
void RTC_enableOverflowISR(void(*ov_isr)(void))
Enables the overflow ISR.
Header file for stm32f103cb SYSTICK.
mcu_error RTC_setup(uint32_t resolution)
Initialize the Real time clock.
void RTC_disableOverflowISR(void)
disables the overflow ISR.
void RTC_enableResolutionISR(void(*res_isr)(void))
Enables the resolution ISR.
uint8_t RTC_isAlarmEnabled(void)
Determine if the alarm interrupt is enabled.
mcu_error RTC_calibrate(uint32_t resolution)
Calibrate the RTC to a given resolution in milliseconds.
mcu_error
Error enumerators for the Debug peripheral.