stm32duino / STM32RTC

Arduino RTC library for STM32.
127 stars 48 forks source link

stm32F1 set/get prescaler div interface change #56

Closed FRASTM closed 2 years ago

FRASTM commented 2 years ago

This PR is defining the set/getPrediv functions in case of stm32F1 With this soc device, the prescaler is a 32bit value corresponding to the DIV registers (read-only) or PREScaler registers (write-only). This configuration is adapted to keep the interface unchanged for other soc. The prediv variable is keeping the value read or written. The RTC_init is not changed.

This PR supersed https://github.com/stm32duino/STM32RTC/pull/38

Requires the change in the stm32duino/STM32Examples : https://github.com/stm32duino/STM32Examples/pull/53

Signed-off-by: Francois Ramu francois.ramu@st.com

FRASTM commented 2 years ago

Requires change in the ./Arduino/libraries/STM32duino_Examples/examples/NonReg/RTC/RTC_Tests for the stm32F1 to have a prediv mapped on a 32bit value

FRASTM commented 2 years ago

Creating new set/get prediv interface for the stm32F1 where parameters differ from other soc series.

FRASTM commented 2 years ago

with suggested changes, removing parameters when useless Changing the function help for the stm32F1

FRASTM commented 2 years ago

add declaration in the rtc.h changing comment and function help section