stm32/h7: Enabled support for the RTC

This commit is contained in:
dragonmux
2024-05-13 22:18:20 +01:00
committed by Piotr Esden-Tempski
parent 777dd14a7a
commit 94247aedda
3 changed files with 40 additions and 3 deletions

View File

@@ -96,6 +96,8 @@ specific memorymap.h header before including this header file.*/
#define RTC_ALRMASSR MMIO32(RTC_BASE + 0x44) #define RTC_ALRMASSR MMIO32(RTC_BASE + 0x44)
#define RTC_ALRMBSSR MMIO32(RTC_BASE + 0x48) #define RTC_ALRMBSSR MMIO32(RTC_BASE + 0x48)
#define RTC_OR MMIO32(RTC_BASE + 0x4c)
#define RTC_BKP_BASE (RTC_BASE + 0x50) #define RTC_BKP_BASE (RTC_BASE + 0x50)
/** RTC backup registers (RTC_BKPxR) */ /** RTC backup registers (RTC_BKPxR) */
#define RTC_BKPXR(reg) MMIO32(RTC_BKP_BASE + (4 * (reg))) #define RTC_BKPXR(reg) MMIO32(RTC_BKP_BASE + (4 * (reg)))
@@ -472,5 +474,3 @@ END_DECLS
#warning "rtc_common_l1f024.h should not be included explicitly, only via rtc.h" #warning "rtc_common_l1f024.h should not be included explicitly, only via rtc.h"
#endif #endif
/** @endcond */ /** @endcond */

View File

@@ -0,0 +1,36 @@
/** @defgroup rtc_defines RTC Defines
@brief <b>Defined Constants and Types for the STM32H7xx RTC</b>
@ingroup STM32H7xx_defines
@version 1.0.0
@date 18 December 2017
LGPL License Terms @ref lgpl_license
*/
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBOPENCM3_RTC_H
#define LIBOPENCM3_RTC_H
#include <libopencm3/stm32/common/rtc_common_l1f024.h>
#endif

View File

@@ -36,7 +36,8 @@
# include <libopencm3/stm32/l1/rtc.h> # include <libopencm3/stm32/l1/rtc.h>
#elif defined(STM32L4) #elif defined(STM32L4)
# include <libopencm3/stm32/l4/rtc.h> # include <libopencm3/stm32/l4/rtc.h>
#elif defined(STM32H7)
# include <libopencm3/stm32/h7/rtc.h>
#else #else
# error "stm32 family not defined." # error "stm32 family not defined."
#endif #endif