git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6635 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
151ca1d309
commit
fb6967cd23
|
@ -77,6 +77,16 @@
|
|||
/* Module pre-compile time settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables an alternative timer implementation.
|
||||
* @details Usually the port uses a timer interface defined in the file
|
||||
* @p chcore_timer.h, if this option is enabled then the file
|
||||
* @p chcore_timer_alt.h is included instead.
|
||||
*/
|
||||
#if !defined(PORT_USE_ALT_TIMER)
|
||||
#define PORT_USE_ALT_TIMER FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Derived constants and error checks. */
|
||||
/*===========================================================================*/
|
||||
|
@ -222,8 +232,12 @@ struct context {
|
|||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#if CH_CFG_ST_TIMEDELTA > 0
|
||||
#if !PORT_USE_ALT_TIMER
|
||||
#include "chcore_timer.h"
|
||||
#endif
|
||||
#else /* PORT_USE_ALT_TIMER */
|
||||
#include "chcore_timer_alt.h"
|
||||
#endif /* PORT_USE_ALT_TIMER */
|
||||
#endif /* CH_CFG_ST_TIMEDELTA > 0 */
|
||||
#endif /* !defined(_FROM_ASM_) */
|
||||
|
||||
#endif /* _CHCORE_H_ */
|
||||
|
|
|
@ -29,14 +29,6 @@
|
|||
#ifndef _CHCORE_TIMER_H_
|
||||
#define _CHCORE_TIMER_H_
|
||||
|
||||
#if defined(PORT_DO_NOT_USE_ST)
|
||||
/* If, for some reason, the use of the HAL-provided ST timer port interface
|
||||
is not wanted, it is possible to provide the timer interface into a custom
|
||||
module.*/
|
||||
#include "chcore_timer_ext.h"
|
||||
|
||||
#else /* !defined(PORT_DO_NOT_USE_ST) */
|
||||
|
||||
/* This is the only header in the HAL designed to be include-able alone.*/
|
||||
#include "st.h"
|
||||
|
||||
|
@ -128,8 +120,6 @@ static inline systime_t port_timer_get_alarm(void) {
|
|||
return stGetAlarm();
|
||||
}
|
||||
|
||||
#endif /* !defined(PORT_DO_NOT_USE_ST) */
|
||||
|
||||
#endif /* _CHCORE_TIMER_H_ */
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Reference in New Issue