diff --git a/os/hal/ports/AVR/hal_lld.h b/os/hal/ports/AVR/hal_lld.h index da16acce9..810e1614b 100644 --- a/os/hal/ports/AVR/hal_lld.h +++ b/os/hal/ports/AVR/hal_lld.h @@ -37,7 +37,7 @@ /** * @brief Platform name. */ -#define PLATFORM_NAME "AVR" +#define PLATFORM_NAME "AVR" /** * @brief Timer maximum value @@ -63,38 +63,32 @@ /* Derived constants and error checks. */ /*===========================================================================*/ -#ifdef _NIL_ -#define CFG_ST_FREQUENCY NIL_CFG_ST_FREQUENCY -#else -#define CFG_ST_FREQUENCY CH_CFG_ST_FREQUENCY -#endif - -/* Find the most suitable prescaler setting for the desired CFG_ST_FREQUENCY */ -#if ((F_CPU / CFG_ST_FREQUENCY) <= AVR_TIMER_COUNTER_MAX) +/* Find the most suitable prescaler setting for the desired OSAL_ST_FREQUENCY */ +#if ((F_CPU / OSAL_ST_FREQUENCY) <= AVR_TIMER_COUNTER_MAX) #define AVR_TIMER_PRESCALER 1 - #define AVR_TIMER_PRESCALER_BITS (0 << CS02) | (0 << CS01) | (1 << CS00); /* CLK */ -#elif ((F_CPU / CFG_ST_FREQUENCY / 8) <= AVR_TIMER_COUNTER_MAX) + #define AVR_TIMER_PRESCALER_BITS (0<