Use the builtin RTC and display it

Its roughly %15 fast, and initializes to zero, but the display
currently shows HH:MM:SS AM/PM.
This commit is contained in:
2019-03-11 22:56:08 -07:00
parent dedcb5af71
commit d5bfecedb2
10 changed files with 285 additions and 8 deletions

View File

@@ -27,8 +27,22 @@
#include <assert.h>
/**
* I'll probably regret writing all of these at some point.
*/
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
#define MIN(a,b) ((a > b) ? (b) : (a))
#define MAX(a,b) ((a < b) ? (b) : (a))
/*
* For usage with STM32 libraries
*/
#define STM32_FIELD(x, name) \
((x) & name##_Msk) >> (name##_Pos)
/*
* Bitwise Operations
*/