Skip to content

Commit

Permalink
Add target: NEUTRONRCH7BT (iNavFlight#8277)
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz authored and sensei-hacker committed Oct 17, 2022
1 parent ce2dbfc commit b2dbcfb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/main/target/NEUTRONRCH7BT/config.c
@@ -0,0 +1,35 @@
/*
* This file is part of Cleanflight.
*
* Cleanflight is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Cleanflight is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdint.h>

#include "platform.h"

#include "fc/fc_msp_box.h"
#include "fc/config.h"

#include "io/piniobox.h"
#include "io/serial.h"

void targetConfiguration(void)
{
serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART3)].functionMask = FUNCTION_MSP;
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2;
pinioBoxConfigMutable()->permanentId[2] = BOX_PERMANENT_ID_USER3;
// compassConfigMutable()->mag_align = XXX;
}
5 changes: 5 additions & 0 deletions src/main/target/NEUTRONRCH7BT/target.h
Expand Up @@ -33,6 +33,9 @@
// #define USE_DUAL_GYRO
// #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS

#define USE_EXTI
#define USE_MPU_DATA_READY_SIGNAL

// *************** SPI1 IMU0 BMI270 *****************
#define USE_SPI
#define USE_SPI_DEVICE_1
Expand All @@ -45,6 +48,7 @@
#define IMU_BMI270_ALIGN CW270_DEG
#define BMI270_SPI_BUS BUS_SPI1
#define BMI270_CS_PIN PC15
#define BMI270_EXTI_PIN PB2

// *************** SPI4 IMU1 BMI270 *****************
#define USE_SPI_DEVICE_4
Expand All @@ -57,6 +61,7 @@
// #define IMU_BMI270_ALIGN CW0_DEG_FLIP
// #define BMI270_SPI_BUS BUS_SPI4
// #define BMI270_CS_PIN PE11
// #define BMI270_EXTI_PIN PE15

// *************** SPI2 OSD ***********************
#define USE_SPI_DEVICE_2
Expand Down

0 comments on commit b2dbcfb

Please sign in to comment.