DarkElvenAngel
Posts: 930
Joined: Tue Mar 20, 2018 9:53 pm

How to code for a RTC

Wed Jul 17, 2019 5:26 pm

Hello Everyone,

I'm looking to writing a system daemon that among other tasks will look after the system time and RTC.

I'm working in a limited Buildroot environment and I'm just looking for examples of how to use rtc.h I want to be able to set system and RTC time as well as synchronize time between both.

Thanks

DarkElvenAngel
Posts: 930
Joined: Tue Mar 20, 2018 9:53 pm

Re: How to code for a RTC

Mon Mar 23, 2020 8:53 pm

I'm revisiting this project does anyone know of a way to read and write to a RTC specifically I am using a DS1307.

This should be running with the kernel module. Is there an interface to do this? I don't want to reinvent the wheel if one exists.

Thanks.

deepo
Posts: 587
Joined: Sun Dec 30, 2018 8:36 pm
Location: Denmark

Re: How to code for a RTC

Mon Mar 23, 2020 10:15 pm

Have a look at this, this might still work with newer Raspbian versions:
https://learn.adafruit.com/adding-a-rea ... t-rtc-time

/Mogens

Return to “C/C++”