• Talarubi's avatar
    Fixed: Restore SPC7110 and S-RTC time properly · a9571ff5
    Talarubi authored
    Loading and unloading the RTC is a little odd, since it's normally
    always powered in the first place. What we want, and what the load()
    functions really do, is to resync using the saved timestamps or
    reset it. unload() proper doesn't do anything.
    However, an interface refactoring after v098 reordered the above
    operations, and this (along with a typo, shh!) was causing the already
    synced time to be cleared.
    I've added checks so that whenever rtc.ram can't be found, load() gets
    called with empty arguments to initialise the defaults (like putting
    in a fresh battery).
load.cpp 13.5 KB