Enable buttons and the display.

Kind-of-sort-of usable-ish.
This commit is contained in:
2019-06-06 22:30:27 -07:00
parent 1cc2f7adf4
commit 125ddfb687
19 changed files with 937 additions and 196 deletions

View File

@@ -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;