Compare commits
2 Commits
f8ee536829
...
7e8a6b0dad
Author | SHA1 | Date | |
---|---|---|---|
7e8a6b0dad | |||
a897b7d9be |
@ -1 +1 @@
|
||||
Subproject commit 1388412d70fc9673465d9ae1f115d7696c06d77d
|
||||
Subproject commit 2a90cdee18579b8897c572f6cd110efbc1c82f02
|
@ -64,28 +64,6 @@ static inline void printLocalTime(const rtc::DateTime &dateTime)
|
||||
serial << dateTime << (dst ? F(" +2") : F(" +1")) << F("\r\n");
|
||||
}
|
||||
|
||||
static inline bool operator==(const rtc::DateTime &lhs, const rtc::DateTime &rhs)
|
||||
{
|
||||
if (lhs.second != rhs.second)
|
||||
return false;
|
||||
if (lhs.minute != rhs.minute)
|
||||
return false;
|
||||
if (lhs.hour != rhs.hour)
|
||||
return false;
|
||||
if (lhs.day != rhs.day)
|
||||
return false;
|
||||
if (lhs.month != rhs.month)
|
||||
return false;
|
||||
if (lhs.year != rhs.year)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool operator!=(const rtc::DateTime &lhs, const rtc::DateTime &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
static inline size_t receiveLine(char *buffer, const size_t maxLength)
|
||||
{
|
||||
uart_t serial;
|
||||
@ -148,6 +126,13 @@ int main()
|
||||
{
|
||||
uart_t serial;
|
||||
rtc::DS3231<i2c::Hardware<100'000>, false> ds3231;
|
||||
io::Pin<io::P::C3> rtcPwr;
|
||||
|
||||
rtcPwr = false;
|
||||
rtcPwr.dir(io::Dir::OUT);
|
||||
|
||||
rtcPwr = true;
|
||||
_delay_ms(1000);
|
||||
|
||||
ds3231.init();
|
||||
serial.init();
|
||||
|
Loading…
Reference in New Issue
Block a user