bsp_rtc.h 952 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __BSP_RTC_H__
  2. #define __BSP_RTC_H__
  3. #define RTC_LOG_LVL ELOG_LVL_DEBUG
  4. #if !defined(LOG_TAG)
  5. #define LOG_TAG "bsp_rtc"
  6. #endif
  7. #undef LOG_LVL
  8. #if defined(RTC_LOG_LVL)
  9. #define LOG_LVL RTC_LOG_LVL
  10. #endif
  11. #include <rtthread.h>
  12. #include "stm32g0xx_hal.h"
  13. #include "bsp_date.h"
  14. #define FLASH_SPI_CS_ENABLE() HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_RESET)
  15. #define FLASH_SPI_CS_DISABLE() HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET)
  16. extern RTC_HandleTypeDef hrtc;
  17. extern struct rtc_time systmtime;
  18. #define RTC_AUTO_1_SECOND 1000000
  19. #define RTC_OUTPUTSOURCE_NONE 1000000
  20. void MX_RTC_Init(void);
  21. int inter_standby(uint16_t standbytime);
  22. void Set_Alarm_A_Wakeup(uint16_t standbytime);
  23. void GPIO_Set_Lowpower(void);
  24. #endif /* __BSP_RTC_H__ */
  25. /******************* (C) COPYRIGHT 2015-2020 ӲʯǶ��ʽ�����Ŷ� *****END OF FILE****/