better location for CORE_CLOCK

This commit is contained in:
rusefi 2018-12-26 21:35:52 -05:00
parent 87aed49727
commit ab16df027a
3 changed files with 7 additions and 3 deletions

View File

@ -28,6 +28,9 @@
#ifndef _CHCONF_H_ #ifndef _CHCONF_H_
#define _CHCONF_H_ #define _CHCONF_H_
// todo: access some existing configuration field
#define CORE_CLOCK 168000000
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#define PORT_IDLE_THREAD_STACK_SIZE 1024 #define PORT_IDLE_THREAD_STACK_SIZE 1024

View File

@ -28,6 +28,9 @@
#ifndef CHCONF_H #ifndef CHCONF_H
#define CHCONF_H #define CHCONF_H
// todo: access some existing configuration field
#define CORE_CLOCK 168000000
#define _CHIBIOS_RT_CONF_ #define _CHIBIOS_RT_CONF_
#if !defined(EFI_CLOCK_LOCKS) || defined(__DOXYGEN__) #if !defined(EFI_CLOCK_LOCKS) || defined(__DOXYGEN__)

View File

@ -115,11 +115,9 @@ int getRemainingStack(thread_t *otp);
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
// todo: access some existing configuration field
#define CORE_CLOCK 168000000
// 168 ticks in microsecond // 168 ticks in microsecond
#define US_TO_NT_MULTIPLIER 168 #define US_TO_NT_MULTIPLIER (CORE_CLOCK / 1000000)
/** /**
* converts efitimeus_t to efitick_t * converts efitimeus_t to efitick_t