mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Adding a per-target unit test for timer metadata consistency.
This commit is contained in:
parent
17b66067bb
commit
9d553380c3
11 changed files with 317 additions and 51 deletions
|
@ -0,0 +1,21 @@
|
|||
#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))
|
Loading…
Add table
Add a link
Reference in a new issue