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)
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/>.
26 #ifdef USE_TARGET_CONFIG
28 #include "config_helper.h"
30 #include "io/serial.h"
32 #include "pg/max7456.h"
37 #include "io/ledstrip.h"
38 #include "config/config.h"
39 #include "pg/piniobox.h"
40 #include "common/axis.h"
41 #include "sensors/barometer.h"
42 #include "sensors/compass.h"
43 #include "sensors/gyro.h"
44 #include "flight/pid.h"
45 #include "drivers/pwm_output.h"
48 static targetSerialPortFunction_t targetSerialPortFunction
[] = {
49 { SERIAL_PORT_USART1
, FUNCTION_RX_SERIAL
},
50 { SERIAL_PORT_USART3
, FUNCTION_VTX_SMARTAUDIO
},
54 static targetSerialPortFunction_t targetSerialPortFunction
[] = {
55 { SERIAL_PORT_USART1
, FUNCTION_TELEMETRY_SMARTPORT
},
56 { SERIAL_PORT_USART3
, FUNCTION_VTX_TRAMP
},
57 { SERIAL_PORT_UART4
, FUNCTION_RCDEVICE
},
58 { SERIAL_PORT_USART6
, FUNCTION_RX_SERIAL
},
62 void targetConfiguration(void)
65 // OMNIBUS F4 AIO (1st gen) has a AB7456 chip that is detected as MAX7456
66 max7456ConfigMutable()->clockConfig
= MAX7456_CLOCK_CONFIG_FULL
;
70 targetSerialPortFunctionConfig(targetSerialPortFunction
, ARRAYLEN(targetSerialPortFunction
));
73 pinioBoxConfigMutable()->permanentId
[0] = 40;
74 vtxSettingsConfigMutable()->pitModeFreq
= 0;
75 ledStripStatusModeConfigMutable()->ledConfigs
[0] = DEFINE_LED(0, 0, 0, 0, LF(COLOR
), LO(VTX
), 0);
76 targetSerialPortFunctionConfig(targetSerialPortFunction
, ARRAYLEN(targetSerialPortFunction
));
77 motorConfigMutable()->dev
.motorPwmProtocol
= PWM_TYPE_DSHOT600
;
78 pidConfigMutable()->pid_process_denom
= 1; // 8kHz PID