We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7309bd9 commit 774ee68Copy full SHA for 774ee68
targets/TARGET_STM/lp_ticker.c
@@ -59,16 +59,19 @@ const ticker_info_t *lp_ticker_get_info()
59
60
volatile uint8_t lp_Fired = 0;
61
62
+static int LPTICKER_inited = 0;
63
+
64
static void LPTIM1_IRQHandler(void);
65
static void (*irq_handler)(void);
66
67
void lp_ticker_init(void)
68
{
69
/* Check if LPTIM is already configured */
- if (__HAL_RCC_LPTIM1_IS_CLK_ENABLED()) {
70
+ if (LPTICKER_inited) {
71
lp_ticker_disable_interrupt();
72
return;
73
}
74
+ LPTICKER_inited = 1;
75
76
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = {0};
77
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
0 commit comments