Merge pull request #11430 from phobos-/crazybee-icm
[betaflight.git] / src / test / unit / timer_definition_unittest.include / drivers / timer.h
blob2becfe977f86aee6d7d5e9fe4100e6c10b1d160a
1 #include <mock_enums.h>
3 typedef struct timerHardware_s {
4 enum TestTimerEnum timer;
5 enum TestChannelEnum channel;
6 enum TestPinEnum pin;
7 enum TestTimUseEnum purpose;
8 unsigned int def_tim_counter;
9 } timerHardware_t;
11 // F7 and F4 have 6 arguments, F3 and F1 have 5 arguments.
12 #define DEF_TIM(timer_, channel_, pin_, purpose_, ...) \
13 { \
14 .timer = timer_, \
15 .channel = channel_, \
16 .pin = pin_, \
17 .purpose = purpose_, \
18 .def_tim_counter = __COUNTER__, \
21 #define TIM_N(n) (1 << (n))