You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
384 B

  1. #pragma once
  2. #include "Time2.h"
  3. #include "Hardware.h"
  4. namespace rtc {
  5. inline void powerOn() {
  6. hardware::i2c::rtcPowerOn();
  7. }
  8. inline void powerOff() {
  9. hardware::i2c::rtcPowerOff();
  10. }
  11. void setup();
  12. timestamp_t getTime();
  13. void setTime(timestamp_t &time);
  14. inline void setAlarm(uint16_t seconds) {
  15. setAlarm(getTime() + seconds);
  16. }
  17. void setAlarm(timestamp_t &time);
  18. }