mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Support for R1 Neo hardware. New variant and baseboard class. * Known issues: - power management is not currently supported - power off via long button press is not implemented Add support for Epson Seiko RX8130CE I2C Real-time clock.
33 lines
722 B
C++
33 lines
722 B
C++
#ifndef __RTC_RX8130CE_H__
|
|
#define __RTC_RX8130CE_H__
|
|
|
|
#include <Arduino.h>
|
|
#include <Wire.h>
|
|
#include <time.h>
|
|
#include "RTClib.h"
|
|
|
|
class RTC_RX8130CE : RTC_I2C {
|
|
private:
|
|
const uint8_t _addr = 0x32;
|
|
|
|
bool stop(bool stop);
|
|
|
|
protected:
|
|
|
|
public:
|
|
bool begin(TwoWire *wire);
|
|
bool setTime(struct tm *t);
|
|
bool getTime(struct tm *t);
|
|
void adjust(DateTime t);
|
|
|
|
DateTime now();
|
|
uint32_t unixtime();
|
|
|
|
bool writeRAM(uint8_t address, uint8_t value);
|
|
size_t writeRAM(uint8_t address, uint8_t *value, size_t len);
|
|
bool readRAM(uint8_t address, uint8_t *value, size_t len);
|
|
uint8_t readRAM(uint8_t address);
|
|
|
|
};
|
|
|
|
#endif
|