avoiding magic constant
This commit is contained in:
parent
a92db53ee7
commit
91c1533abe
|
@ -10,8 +10,6 @@
|
|||
#ifndef EFIFEATURES_H_
|
||||
#define EFIFEATURES_H_
|
||||
|
||||
#define EFI_CLOCK_LOCKS FALSE
|
||||
|
||||
#define EFI_GPIO_HARDWARE TRUE
|
||||
|
||||
#define EFI_FSIO TRUE
|
||||
|
|
|
@ -269,7 +269,7 @@ static int rtcStartTime;
|
|||
|
||||
static void timeInfo(void) {
|
||||
scheduleMsg(logger, "chTimeNow as seconds = %d", getTimeNowSeconds());
|
||||
scheduleMsg(logger, "hal seconds = %d", halTime.get() / 168000000LL);
|
||||
scheduleMsg(logger, "hal seconds = %d", halTime.get() / (long)CORE_CLOCK);
|
||||
|
||||
#if EFI_RTC || defined(__DOXYGEN__)
|
||||
int unix = rtcGetTimeUnixSec(&RTCD1) - rtcStartTime;
|
||||
|
|
|
@ -61,7 +61,7 @@ static void lcdSleep(int period) {
|
|||
if (BUSY_WAIT_DELAY) {
|
||||
// this mode is useful for displaying messages to report OS fatal issues
|
||||
|
||||
int ticks = 168000000 / 1000000 * period;
|
||||
int ticks = CORE_CLOCK / 1000000 * period;
|
||||
int a = 0;
|
||||
for (int i = 0; i < ticks; i++)
|
||||
a += i;
|
||||
|
|
Loading…
Reference in New Issue