/** ****************************************************************************** * @file Examples_LL/RTC/RTC_Alarm_Init/Src/main.c * @author MCD Application Team * @brief This example code shows how to use STM32L4xx RTC LL API to configure * an alarm. * Peripheral initialization done using LL initialization function. ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "clock_conf.h" #include "rtc_conf.h" #include "led_conf.h" #include "lpuart.h" #include "bc660.h" #include "sleep_conf.h" #include "gpio_conf.h" uint32_t counter = 0; //#if (USE_TIMEOUT == 1) //uint32_t Timeout = 0; /* Variable used for Timeout management */ //#endif /* USE_TIMEOUT */ /* Private functions ---------------------------------------------------------*/ /** * @brief Main program * @param None * @retval None */ int main(void) { /* Configure the system clock to 80 MHz */ SystemClock_Config(); /* Initialize LED2 */ LED_Init(); /*##-1- Configure the RTC peripheral #######################################*/ Configure_RTC(); /*##-2- Configure Alarm ####################################################*/ /* Configure RTC Alarm */ Configure_RTC_Alarm(); /* Configure Power IP */ Configure_PWR(); /* Configure Alarm and Button Pins */ Configure_EXTI(); /* Configure LPUART1 (LPUART IP configuration and related GPIO initialization) */ Configure_LPUART(); LL_mDelay(2000); /* Infinite loop */ while (1) { } } #ifdef USE_FULL_ASSERT /** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval None */ void assert_failed(uint8_t *file, uint32_t line) { /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* Infinite loop */ while (1) { } } #endif /** * @} */ /** * @} */