Fix function brace style
[betaflight.git] / src / main / target / common_deprecated_post.h
blobf206e78373df266edb78e0734ce579e228f36a2b
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 // Flag any deprecated defines with compile errors so they
22 // can be cleaned up and not further propagated.
24 #pragma once
26 #ifdef ACC_1_ALIGN
27 #error "The ACC_1_ALIGN define has been deprecated - please remove from the target definition"
28 #endif
30 #ifdef ACC_2_ALIGN
31 #error "The ACC_2_ALIGN define has been deprecated - please remove from the target definition"
32 #endif
34 #ifdef ACC_ICM20689_ALIGN
35 #error "The ACC_ICM20689_ALIGN define has been deprecated - please remove from the target definition"
36 #endif
38 #ifdef ACC_MPU6000_1_ALIGN
39 #error "The ACC_MPU6000_1_ALIGN define has been deprecated - please remove from the target definition"
40 #endif
42 #ifdef ACC_MPU6000_2_ALIGN
43 #error "The ACC_MPU6000_2_ALIGN define has been deprecated - please remove from the target definition"
44 #endif
46 #ifdef ACC_MPU6000_ALIGN
47 #error "The ACC_MPU6000_ALIGN define has been deprecated - please remove from the target definition"
48 #endif
50 #ifdef ACC_MPU6500_1_ALIGN
51 #error "The ACC_MPU6500_1_ALIGN define has been deprecated - please remove from the target definition"
52 #endif
54 #ifdef ACC_MPU6500_2_ALIGN
55 #error "The ACC_MPU6500_2_ALIGN define has been deprecated - please remove from the target definition"
56 #endif
58 #ifdef ACC_MPU6500_ALIGN
59 #error "The ACC_MPU6500_ALIGN define has been deprecated - please remove from the target definition"
60 #endif
62 #ifdef GYRO_ICM20689_ALIGN
63 #error "The GYRO_ICM20689_ALIGN define has been deprecated - please remove from the target definition"
64 #endif
66 #ifdef GYRO_MPU6000_1_ALIGN
67 #error "The GYRO_MPU6000_1_ALIGN define has been deprecated - please remove from the target definition"
68 #endif
70 #ifdef GYRO_MPU6000_2_ALIGN
71 #error "The GYRO_MPU6000_2_ALIGN define has been deprecated - please remove from the target definition"
72 #endif
74 #ifdef GYRO_MPU6000_ALIGN
75 #error "The GYRO_MPU6000_ALIGN define has been deprecated - please remove from the target definition"
76 #endif
78 #ifdef GYRO_MPU6500_1_ALIGN
79 #error "The GYRO_MPU6500_1_ALIGN define has been deprecated - please remove from the target definition"
80 #endif
82 #ifdef GYRO_MPU6500_2_ALIGN
83 #error "The GYRO_MPU6500_2_ALIGN define has been deprecated - please remove from the target definition"
84 #endif
86 #ifdef GYRO_MPU6500_ALIGN
87 #error "The GYRO_MPU6000_ALIGN define has been deprecated - please remove from the target definition"
88 #endif
90 #ifdef ICM20689_CS_PIN
91 #error "The ICM20689_CS_PIN define has been deprecated - please remove from the target definition"
92 #endif
94 #ifdef ICM20689_SPI_INSTANCE
95 #error "The ICM20689_SPI_INSTANCE define has been deprecated - please remove from the target definition"
96 #endif
98 #ifdef MPU_INT_EXTI
99 #error "The MPU_INT_EXTI define has been deprecated - please remove from the target definition"
100 #endif
102 #ifdef MPU6000_CS_PIN
103 #error "The MPU6000_CS_PIN define has been deprecated - please remove from the target definition"
104 #endif
106 #ifdef MPU6000_SPI_INSTANCE
107 #error "The MPU6000_SPI_INSTANCE define has been deprecated - please remove from the target definition"
108 #endif
110 #ifdef MPU6500_CS_PIN
111 #error "The MPU6500_CS_PIN define has been deprecated - please remove from the target definition"
112 #endif
114 #ifdef MPU6500_SPI_INSTANCE
115 #error "The MPU6500_SPI_INSTANCE define has been deprecated - please remove from the target definition"
116 #endif
118 #ifdef SDCARD_DMA_CHANNEL
119 #error "The SDCARD_DMA_CHANNEL define has been deprecated - please remove from the target definition"
120 #endif
122 #ifdef SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER
123 #error "The SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER define should not be part of the target definition"
124 #endif
126 #ifdef SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER
127 #error "The SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER define should not be part of the target definition"
128 #endif
130 #ifdef USE_DUAL_GYRO
131 #error "The USE_DUAL_GYRO define has been deprecated - please remove from the target definition"
132 #endif
134 #ifdef USE_SERIAL_4WAY_BLHELI_INTERFACE
135 #error "The USE_SERIAL_4WAY_BLHELI_INTERFACE define should not be part of the target definition"
136 #endif
138 #if defined(USE_DMA_SPEC) && (defined(ADC1_DMA_STREAM) || defined(ADC2_DMA_STREAM) || defined(ADC3_DMA_STREAM))
139 #error "ADCx_DMA_STREAM defines cannot be used when USE_DMA_OPT is used."
140 #endif
142 #define DMARXCAT(s) DMARCAT(s)
143 #define DMARCAT(s) DMAR_##s
144 #define DMAR_true 1
145 #define DMAR_false 1
147 #if DMARXCAT(ENABLE_DSHOT_DMAR) == 1 || DMARXCAT(ENABLE_DSHOT_DMAR) == 1
148 #error "Use DSHOT_DMAR_ON or DSHOT_DMAR_OFF instead of boolean values for ENABLE_DSHOT_DMAR"
149 #endif
151 #ifdef CAMERA_CONTROL_PIN
152 #error "The CAMERA_CONTROL_PIN define in target.h is deprecated. Use timerHardware[] array entry with TIM_USE_CAMERA_CONTROL"
153 #endif