aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/ports/AVR/TINY/LLD/avr_timers.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/ports/AVR/TINY/LLD/avr_timers.h')
-rw-r--r--lib/chibios/os/hal/ports/AVR/TINY/LLD/avr_timers.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/AVR/TINY/LLD/avr_timers.h b/lib/chibios/os/hal/ports/AVR/TINY/LLD/avr_timers.h
new file mode 100644
index 000000000..45c5c3eb3
--- /dev/null
+++ b/lib/chibios/os/hal/ports/AVR/TINY/LLD/avr_timers.h
@@ -0,0 +1,55 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef AVR_TIMERS_H
18#define AVR_TIMERS_H
19
20#include "mcuconf.h"
21
22#if ((OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING) && \
23 (AVR_GPT_USE_TIM1 || AVR_PWM_USE_TIM1 || AVR_ICU_USE_TIM1))
24 #error "Timer 1 cannot be used by drivers when running in tickless mode."
25#endif
26
27#if ((AVR_GPT_USE_TIM1 && AVR_PWM_USE_TIM1) || \
28 (AVR_GPT_USE_TIM1 && AVR_ICU_USE_TIM1) || \
29 (AVR_PWM_USE_TIM1 && AVR_ICU_USE_TIM1))
30 #error "Timer 1 cannot simultaneously be used by multiple drivers."
31#endif
32
33#if ((AVR_GPT_USE_TIM2 && AVR_PWM_USE_TIM2))
34 #error "Timer 2 cannot simultaneously be used by multiple drivers."
35#endif
36
37#if ((AVR_GPT_USE_TIM3 && AVR_PWM_USE_TIM3) || \
38 (AVR_GPT_USE_TIM3 && AVR_ICU_USE_TIM3) || \
39 (AVR_PWM_USE_TIM3 && AVR_ICU_USE_TIM3))
40 #error "Timer 3 cannot simultaneously be used by multiple drivers."
41#endif
42
43#if ((AVR_GPT_USE_TIM4 && AVR_PWM_USE_TIM4) || \
44 (AVR_GPT_USE_TIM4 && AVR_ICU_USE_TIM4) || \
45 (AVR_PWM_USE_TIM4 && AVR_ICU_USE_TIM4))
46 #error "Timer 4 cannot simultaneously be used by multiple drivers."
47#endif
48
49#if ((AVR_GPT_USE_TIM5 && AVR_PWM_USE_TIM5) || \
50 (AVR_GPT_USE_TIM5 && AVR_ICU_USE_TIM5) || \
51 (AVR_PWM_USE_TIM5 && AVR_ICU_USE_TIM5))
52 #error "Timer 5 cannot simultaneously be used by multiple drivers."
53#endif
54
55#endif /* AVR_TIMERS_H */