Enable buttons and the display.
Kind-of-sort-of usable-ish.
This commit is contained in:
16
RtcDriver.h
16
RtcDriver.h
@@ -31,16 +31,6 @@
|
||||
|
||||
namespace BSP {
|
||||
|
||||
struct time_bcd {
|
||||
uint8_t hour_tens;
|
||||
uint8_t hour_ones;
|
||||
uint8_t minute_tens;
|
||||
uint8_t minute_ones;
|
||||
uint8_t second_tens;
|
||||
uint8_t second_ones;
|
||||
bool pm;
|
||||
};
|
||||
|
||||
class RtcDriver {
|
||||
public:
|
||||
|
||||
@@ -52,7 +42,8 @@ public:
|
||||
};
|
||||
static Common::ReturnCode init();
|
||||
static void increment_seconds();
|
||||
static Common::ReturnCode get_time(time_bcd &tm_bcd);
|
||||
static Common::ReturnCode get_time(Common::WallClockTime &tm_bcd);
|
||||
static Common::ReturnCode set_time(const Common::WallClockTime &tm_bcd);
|
||||
static Common::ReturnCode set_wakeup_in(Common::time_t wakeup_delay);
|
||||
|
||||
private:
|
||||
@@ -80,8 +71,7 @@ private:
|
||||
void increment_seconds();
|
||||
|
||||
private:
|
||||
/** I'll be dead before this rolls over */
|
||||
/** FIXME FIXME FIXME: XXX This should be an atomic */
|
||||
/** ~136 years. Good enough for me. */
|
||||
uint32_t m_seconds;
|
||||
|
||||
static constexpr uint32_t LSE_CLOCK_FREQ = 32768;
|
||||
|
||||
Reference in New Issue
Block a user