Added battery cell count based automatic PID profile switching.
[betaflight.git] / src / test / unit / platform.h
blob5c9ae1aa5edadd985b6eed15e8d5d4cae3738257
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #include <stdio.h>
21 #include <stdint.h>
23 #define USE_PARAMETER_GROUPS
25 #define U_ID_0 0
26 #define U_ID_1 1
27 #define U_ID_2 2
29 #define NOINLINE
30 #define FAST_CODE
31 #define FAST_CODE_NOINLINE
32 #define FAST_RAM_ZERO_INIT
33 #define FAST_RAM
35 #define PID_PROFILE_COUNT 3
36 #define USE_MAG
37 #define USE_BARO
38 #define USE_GPS
39 #define USE_DASHBOARD
40 #define USE_TELEMETRY
41 #define USE_LED_STRIP
42 #define USE_SERVOS
43 #define USE_TRANSPONDER
45 typedef enum
47 Mode_TEST = 0x0,
48 Mode_Out_PP = 0x10
49 } GPIO_Mode;
51 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
52 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
53 typedef enum {TEST_IRQ = 0 } IRQn_Type;
54 typedef enum {
55 EXTI_Trigger_Rising = 0x08,
56 EXTI_Trigger_Falling = 0x0C,
57 EXTI_Trigger_Rising_Falling = 0x10
58 } EXTITrigger_TypeDef;
60 typedef struct
62 void *test;
63 } GPIO_TypeDef;
65 typedef struct
67 void* test;
68 } TIM_TypeDef;
70 typedef struct
72 void* test;
73 } TIM_OCInitTypeDef;
75 typedef struct {
76 void* test;
77 } DMA_TypeDef;
79 typedef struct {
80 void* test;
81 } DMA_Channel_TypeDef;
83 uint8_t DMA_GetFlagStatus(void *);
84 void DMA_Cmd(DMA_Channel_TypeDef*, FunctionalState );
85 void DMA_ClearFlag(uint32_t);
87 typedef struct
89 void* test;
90 } SPI_TypeDef;
92 typedef struct
94 void* test;
95 } USART_TypeDef;
97 typedef struct
99 void *test;
100 } I2C_TypeDef;
102 typedef struct
104 void* test;
105 } ADC_TypeDef;
107 #define WS2811_DMA_TC_FLAG (void *)1
108 #define WS2811_DMA_HANDLER_IDENTIFER 0
109 #define NVIC_PriorityGroup_2 0x500
111 #define MCU_TYPE_ID 99
112 #define MCU_TYPE_NAME "UNIT_TEST"
114 #include "target.h"
116 #include "target/common_defaults_post.h"