1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00
betaflight/src/test/unit/timer_definition_unittest.include/drivers/timer.h

21 lines
731 B
C

#include <mock_enums.h>
typedef struct timerHardware_s {
enum TestTimerEnum timer;
enum TestChannelEnum channel;
enum TestPinEnum pin;
enum TestTimUseEnum purpose;
unsigned int def_tim_counter;
} timerHardware_t;
// F7 and F4 have 6 arguments, F3 and F1 have 5 arguments.
#define DEF_TIM(timer_, channel_, pin_, purpose_, ...) \
{ \
.timer = timer_, \
.channel = channel_, \
.pin = pin_, \
.purpose = purpose_, \
.def_tim_counter = __COUNTER__, \
}
#define TIM_N(n) (1 << (n))