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:
14
macros.h
14
macros.h
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user