5 #include <twr_common.h>
9 TWR_SYSTEM_CLOCK_MSI = 0,
10 TWR_SYSTEM_CLOCK_HSI = 1,
11 TWR_SYSTEM_CLOCK_PLL = 2
15 void twr_system_init(
void);
17 static inline void twr_system_sleep(
void)
24 if (SCB->SCR & SCB_SCR_SLEEPDEEP_Msk) {
40 RTC->ISR &= ~RTC_ISR_RSF;
45 twr_system_clock_t twr_system_clock_get(
void);
47 void twr_system_hsi16_enable(
void);
49 void twr_system_hsi16_disable(
void);
51 void twr_system_pll_enable(
void);
53 void twr_system_pll_disable(
void);
55 void twr_system_deep_sleep_disable(
void);
57 void twr_system_deep_sleep_enable(
void);
59 void twr_system_enter_standby_mode(
void);
61 uint32_t twr_system_get_clock(
void);
63 void twr_system_reset(
void);
65 bool twr_system_get_vbus_sense(
void);