mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
Merge pull request #7185 from MATEKSYS/master
MatekH743: fix some definitions
This commit is contained in:
commit
20e6553d52
3 changed files with 111 additions and 63 deletions
30
src/main/target/MATEKH743/config.c
Normal file
30
src/main/target/MATEKH743/config.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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 "io/piniobox.h"
|
||||
|
||||
void targetConfiguration(void)
|
||||
{
|
||||
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
|
||||
pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2;
|
||||
}
|
|
@ -40,8 +40,8 @@ const timerHardware_t timerHardware[] = {
|
|||
|
||||
DEF_TIM(TIM4, CH1, PD12, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 7), // S7
|
||||
DEF_TIM(TIM4, CH2, PD13, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 8), // S8
|
||||
DEF_TIM(TIM4, CH3, PD14, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S9
|
||||
DEF_TIM(TIM4, CH4, PD15, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S10 DMA_NONE
|
||||
DEF_TIM(TIM4, CH3, PD14, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S9
|
||||
DEF_TIM(TIM4, CH4, PD15, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S10 DMA_NONE
|
||||
|
||||
DEF_TIM(TIM15, CH1, PE5, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S11
|
||||
DEF_TIM(TIM15, CH2, PE6, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S12 DMA_NONE
|
||||
|
|
|
@ -21,48 +21,15 @@
|
|||
#define TARGET_BOARD_IDENTIFIER "H743"
|
||||
#define USBD_PRODUCT_STRING "MATEKH743"
|
||||
|
||||
#define USE_TARGET_CONFIG
|
||||
|
||||
#define LED0 PE3
|
||||
#define LED1 PE4
|
||||
|
||||
#define BEEPER PA15
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
// *************** UART *****************************
|
||||
#define USE_VCP
|
||||
|
||||
#define USE_UART1
|
||||
#define UART1_TX_PIN PA9
|
||||
#define UART1_RX_PIN PA10
|
||||
|
||||
#define USE_UART2
|
||||
#define UART2_TX_PIN PD5
|
||||
#define UART2_RX_PIN PD6
|
||||
|
||||
#define USE_UART3
|
||||
#define UART3_TX_PIN PD8
|
||||
#define UART3_RX_PIN PD9
|
||||
|
||||
#define USE_UART4
|
||||
#define UART4_TX_PIN PD1
|
||||
#define UART4_RX_PIN PD0
|
||||
|
||||
#define USE_UART6
|
||||
#define UART6_TX_PIN PC6
|
||||
#define UART6_RX_PIN PC7
|
||||
|
||||
#define USE_UART7
|
||||
#define UART7_TX_PIN PE8
|
||||
#define UART7_RX_PIN PE7
|
||||
|
||||
#define USE_UART8
|
||||
#define UART8_TX_PIN PE1
|
||||
#define UART8_RX_PIN PE0
|
||||
|
||||
#define SERIAL_PORT_COUNT 8
|
||||
|
||||
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
|
||||
#define SERIALRX_PROVIDER SERIALRX_SBUS
|
||||
#define SERIALRX_UART SERIAL_PORT_USART6
|
||||
#define BEEPER_PWM
|
||||
#define BEEPER_PWM_FREQUENCY 2500
|
||||
|
||||
// *************** IMU generic ***********************
|
||||
#define USE_DUAL_GYRO
|
||||
|
@ -79,12 +46,24 @@
|
|||
#define SPI1_MOSI_PIN PD7
|
||||
|
||||
#define USE_IMU_MPU6000
|
||||
#define USE_IMU_MPU6500
|
||||
|
||||
#define IMU1_ALIGN CW90_DEG_FLIP
|
||||
#define IMU1_ALIGN CW0_DEG_FLIP
|
||||
#define IMU1_SPI_BUS BUS_SPI1
|
||||
#define IMU1_CS_PIN PC15
|
||||
#define IMU1_EXTI_PIN NONE
|
||||
#define IMU1_EXTI_PIN PB2
|
||||
|
||||
// *************** SPI4 IMU2 *************************
|
||||
#define USE_SPI_DEVICE_4
|
||||
#define SPI4_SCK_PIN PE12
|
||||
#define SPI4_MISO_PIN PE13
|
||||
#define SPI4_MOSI_PIN PE14
|
||||
|
||||
#define USE_IMU_MPU6500
|
||||
|
||||
#define IMU2_ALIGN CW0_DEG_FLIP
|
||||
#define IMU2_SPI_BUS BUS_SPI4
|
||||
#define IMU2_CS_PIN PE11
|
||||
#define IMU2_EXTI_PIN PE15
|
||||
|
||||
// *************** SPI2 OSD ***********************
|
||||
#define USE_SPI_DEVICE_2
|
||||
|
@ -96,25 +75,16 @@
|
|||
#define MAX7456_SPI_BUS BUS_SPI2
|
||||
#define MAX7456_CS_PIN PB12
|
||||
|
||||
// *************** SPI3 SD BLACKBOX*******************
|
||||
/*
|
||||
#define USE_SDCARD
|
||||
#define USE_SDCARD_SDIO
|
||||
#define SDCARD_SDIO_DMA DMA_TAG(2,3,4)
|
||||
#define SDCARD_SDIO_4BIT
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||
*/
|
||||
// *************** SPI3 SPARE for external RM3100 ***********
|
||||
#define USE_SPI_DEVICE_3
|
||||
#define SPI3_SCK_PIN PB3
|
||||
#define SPI3_MISO_PIN PB4
|
||||
#define SPI3_MOSI_PIN PB5
|
||||
|
||||
// *************** SPI4 IMU2 *************************
|
||||
#define USE_SPI_DEVICE_4
|
||||
#define SPI4_SCK_PIN PE12
|
||||
#define SPI4_MISO_PIN PE13
|
||||
#define SPI4_MOSI_PIN PE14
|
||||
|
||||
#define IMU2_ALIGN CW270_DEG_FLIP
|
||||
#define IMU2_SPI_BUS BUS_SPI4
|
||||
#define IMU2_CS_PIN PE11
|
||||
#define IMU2_EXTI_PIN NONE
|
||||
#define USE_MAG_RM3100
|
||||
#define RM3100_CS_PIN PE2 //CS2 pad
|
||||
// PD4 //CS1 pad
|
||||
#define RM3100_SPI_BUS BUS_SPI3
|
||||
|
||||
// *************** I2C /Baro/Mag *********************
|
||||
#define USE_I2C
|
||||
|
@ -146,7 +116,55 @@
|
|||
#define PITOT_I2C_BUS BUS_I2C2
|
||||
|
||||
#define USE_RANGEFINDER
|
||||
#define RANGEFINDER_I2C_BUS BUS_I2C2
|
||||
#define RANGEFINDER_I2C_BUS BUS_I2C1
|
||||
|
||||
// *************** UART *****************************
|
||||
#define USE_VCP
|
||||
|
||||
#define USE_UART1
|
||||
#define UART1_TX_PIN PA9
|
||||
#define UART1_RX_PIN PA10
|
||||
|
||||
#define USE_UART2
|
||||
#define UART2_TX_PIN PD5
|
||||
#define UART2_RX_PIN PD6
|
||||
|
||||
#define USE_UART3
|
||||
#define UART3_TX_PIN PD8
|
||||
#define UART3_RX_PIN PD9
|
||||
|
||||
#define USE_UART4
|
||||
#define UART4_TX_PIN PB9
|
||||
#define UART4_RX_PIN PB8
|
||||
|
||||
#define USE_UART6
|
||||
#define UART6_TX_PIN PC6
|
||||
#define UART6_RX_PIN PC7
|
||||
|
||||
#define USE_UART7
|
||||
#define UART7_TX_PIN PE8
|
||||
#define UART7_RX_PIN PE7
|
||||
|
||||
#define USE_UART8
|
||||
#define UART8_TX_PIN PE1
|
||||
#define UART8_RX_PIN PE0
|
||||
|
||||
#define USE_SOFTSERIAL1
|
||||
#define SOFTSERIAL_1_TX_PIN PC6 //TX6 pad
|
||||
#define SOFTSERIAL_1_RX_PIN PC6 //TX6 pad
|
||||
|
||||
#define SERIAL_PORT_COUNT 9
|
||||
|
||||
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
|
||||
#define SERIALRX_PROVIDER SERIALRX_SBUS
|
||||
#define SERIALRX_UART SERIAL_PORT_USART6
|
||||
|
||||
// *************** SDIO SD BLACKBOX*******************
|
||||
//#define USE_SDCARD
|
||||
//#define USE_SDCARD_SDIO
|
||||
//#define SDCARD_SDIO_DMA DMA_TAG(2,3,4)
|
||||
//#define SDCARD_SDIO_4BIT
|
||||
//#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||
|
||||
// *************** ADC *****************************
|
||||
#define USE_ADC
|
||||
|
@ -167,8 +185,8 @@
|
|||
// *************** PINIO ***************************
|
||||
#define USE_PINIO
|
||||
#define USE_PINIOBOX
|
||||
#define PINIO1_PIN PE4 // VTX power switcher
|
||||
#define PINIO2_PIN PE15 // 2xCamera switcher
|
||||
#define PINIO1_PIN PD10 // VTX power switcher
|
||||
#define PINIO2_PIN PD11 // 2xCamera switcher
|
||||
|
||||
// *************** LEDSTRIP ************************
|
||||
#define USE_LED_STRIP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue