PebbleOS v4.47.0-757-g12b6c531f
Loading...
Searching...
No Matches
STM32 RTC

RTC driver for the calendar RTC of the STM32H7, in the backup domain: it keeps counting across resets and in Standby. More...

Data Structures

struct  pbl_rtc_stm32_state
 STM32 RTC state. More...
 
struct  pbl_rtc_stm32
 STM32 RTC. More...
 

Macros

#define PBL_RTC_STM32_DEFINE(sym, _name, _base, _pclk, _clk, _exti, _exti_line, _irq)
 Define the RTC.
 

Detailed Description

RTC driver for the calendar RTC of the STM32H7, in the backup domain: it keeps counting across resets and in Standby.


Data Structure Documentation

◆ pbl_rtc_stm32_state

struct pbl_rtc_stm32_state

STM32 RTC state.

Data Fields
pbl_rtc_alarm_callback_t alarm_cb Alarm callback, or nullptr.
void * alarm_user_data Data passed to alarm_cb.

◆ pbl_rtc_stm32

struct pbl_rtc_stm32

STM32 RTC.

Data Fields
uintptr_t base Registers.
struct pbl_clk clk Kernel clock, from PBL_CLK().
uintptr_t exti EXTI registers.
uint8_t exti_line EXTI line of the alarms.
pbl_irq_t irq Alarm interrupt.
struct pbl_clk pclk Bus clock, from PBL_CLK().
struct pbl_rtc rtc RTC.
struct pbl_rtc_stm32_state * state State.

Macro Definition Documentation

◆ PBL_RTC_STM32_DEFINE

#define PBL_RTC_STM32_DEFINE (   sym,
  _name,
  _base,
  _pclk,
  _clk,
  _exti,
  _exti_line,
  _irq 
)
Value:
static struct pbl_rtc_stm32_state sym##_rtc_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_rtc_stm32, struct pbl_rtc, rtc){ \
.rtc = PBL_RTC_INIT(sym, _name, pbl_rtc_stm32_init, nullptr, &pbl_rtc_stm32_ops), \
.base = (_base), \
.pclk = _pclk, \
.clk = _clk, \
.exti = (_exti), \
.exti_line = (_exti_line), \
.irq = (_irq), \
.state = &sym##_rtc_state, \
}; \
PBL_IRQ_CONNECT_NUM(_irq, CONFIG_RTC_STM32_IRQ_PRIO, pbl_rtc_stm32_isr, &sym##_inst, 0)
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:132
STM32 RTC state.
Definition stm32.h:21
STM32 RTC.
Definition stm32.h:29
RTC.
Definition rtc.h:61
#define PBL_RTC_INIT(sym, _name, _init, _parent, _ops)
Initialize a struct pbl_rtc.
Definition rtc.h:84

Define the RTC.

Parameters
symSymbol.
_nameDevice name.
_baseRegisters.
_pclkBus clock, from PBL_CLK().
_clkKernel clock, from PBL_CLK().
_extiEXTI registers.
_exti_lineEXTI line of the alarms.
_irqAlarm interrupt.