altos/stm: Remove stale timer defines
[fw/altos] / src / stm / ao_timer.c
index 5976eb3f6657b6882d8cbfc668524f646f8387f4..5cf1e4a87dd37ab88be0c562e38ff1b78f699384 100644 (file)
 #include "ao.h"
 #include <ao_task.h>
 
+#ifndef HAS_TICK
+#define HAS_TICK 1
+#endif
+
+#if HAS_TICK
 volatile AO_TICK_TYPE ao_tick_count;
 
 AO_TICK_TYPE
@@ -62,20 +67,6 @@ ao_timer_set_adc_interval(uint8_t interval)
 }
 #endif
 
-/*
- * According to the STM clock-configuration, timers run
- * twice as fast as the APB1 clock *if* the APB1 prescaler
- * is greater than 1.
- */
-
-#if AO_APB1_PRESCALER > 1
-#define TIMER_23467_SCALER 2
-#else
-#define TIMER_23467_SCALER 1
-#endif
-
-#define TIMER_10kHz    ((AO_PCLK1 * TIMER_23467_SCALER) / 10000)
-
 #define SYSTICK_RELOAD (AO_SYSTICK / 100 - 1)
 
 void
@@ -88,6 +79,8 @@ ao_timer_init(void)
                           (STM_SYSTICK_CSR_CLKSOURCE_HCLK_8 << STM_SYSTICK_CSR_CLKSOURCE));
 }
 
+#endif
+
 void
 ao_clock_init(void)
 {