-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add target iflight f745 aio #668
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,6 @@ | |
#define USE_USB_DETECT | ||
#define USB_DETECT_PIN PC5 | ||
|
||
|
||
#define USE_UART1 | ||
#define UART1_RX_PIN PA10 | ||
#define UART1_TX_PIN PA9 | ||
|
@@ -118,10 +117,10 @@ | |
#define SPI3_MOSI_PIN PC12 | ||
|
||
#define USE_I2C | ||
#define USE_I2C_DEVICE_2 | ||
#define I2C2_SCL NONE // PB10, UART3_TX | ||
#define I2C2_SDA NONE // PB11, UART3_RX | ||
#define I2C_DEVICE (I2CDEV_2) | ||
#define USE_I2C_DEVICE_1 | ||
#define I2C1_SCL NONE // PB10, UART3_TX | ||
#define I2C1_SDA NONE // PB11, UART3_RX | ||
#define I2C_DEVICE (I2CDEV_1) | ||
Comment on lines
-121
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove changes |
||
|
||
#define USE_ADC | ||
#define CURRENT_METER_ADC_PIN PC1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* This file is part of Cleanflight and Betaflight. | ||
* | ||
* Cleanflight and Betaflight are free software. You can redistribute | ||
* this software and/or modify this software 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 and Betaflight are distributed in the hope that they | ||
* 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 this software. | ||
* | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <stdint.h> | ||
|
||
#include "platform.h" | ||
#include "drivers/io.h" | ||
|
||
#include "drivers/dma.h" | ||
#include "drivers/timer.h" | ||
#include "drivers/timer_def.h" | ||
|
||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { | ||
|
||
DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0 ), // S6_IN DMA2_ST7 | ||
|
||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0 ), // S10_OUT 1 DMA1_ST7 | ||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0 ), // S6_OUT 2 DMA1_ST0 | ||
DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 0 ), // S2_OUT 3 DMA1_ST4 | ||
DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
|
||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM1, CH3, PE13, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM2, CH4, PA3, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im preety all of these extar use any timer definition are first causing issues with uart 1,2,3,4 and are probably causing more issues, im preety sure its only motors, servos, pwm, ppm, and led strip and maybe beeper that need these definitions you can look in timer.h for more info |
||
|
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
/* | ||
* This file is part of Cleanflight and Betaflight. | ||
* | ||
* Cleanflight and Betaflight are free software. You can redistribute | ||
* this software and/or modify this software 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 and Betaflight are distributed in the hope that they | ||
* 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 this software. | ||
* | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define TARGET_BOARD_IDENTIFIER "IFRC" | ||
|
||
#define USBD_PRODUCT_STRING "IFLIGHT_F745_AIO" | ||
|
||
#define LED0_PIN PC13 | ||
|
||
#define USE_BEEPER | ||
#define BEEPER_PIN PD15 | ||
#define BEEPER_INVERTED | ||
|
||
#define MPU6000_CS_PIN PA4 | ||
#define MPU6000_SPI_INSTANCE SPI1 | ||
|
||
#define USE_ACC | ||
#define USE_ACC_SPI_MPU6000 | ||
#define ACC_MPU6000_ALIGN CW0_DEG | ||
|
||
#define USE_GYRO | ||
#define USE_GYRO_SPI_MPU6000 | ||
#define GYRO_MPU6000_ALIGN CW0_DEG | ||
|
||
// MPU6000 interrupts | ||
#define USE_MPU_DATA_READY_SIGNAL | ||
#define MPU_INT_EXTI PD0 | ||
#define USE_EXTI | ||
|
||
#define USE_MAG | ||
#define USE_MAG_HMC5883 | ||
#define USE_MAG_QMC5883 | ||
#define MAG_I2C_INSTANCE (I2CDEV_1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change I2CDEV_1 to I2CDEV_2 |
||
|
||
//#define MAG_HMC5883_ALIGN CW270_DEG_FLIP | ||
//#define MAG_HMC5883_ALIGN CW90_DEG | ||
|
||
#define USE_BARO | ||
#define USE_BARO_MS5611 | ||
#define USE_BARO_BMP280 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add ps if u guys need the driver (which it seems like you doo) inav and bf have it, so to prevent build failure do not remove the previous baro defines just add the new one for future driver. |
||
#define BARO_I2C_INSTANCE (I2CDEV_1) | ||
|
||
#define USABLE_TIMER_CHANNEL_COUNT 14 | ||
|
||
#define USE_VCP | ||
#define USE_USB_DETECT | ||
#define USB_DETECT_PIN PC4 | ||
|
||
#define USE_UART1 | ||
#define UART1_RX_PIN PA10 | ||
#define UART1_TX_PIN PA9 | ||
|
||
#define USE_UART2 | ||
#define UART2_RX_PIN PA3 | ||
#define UART2_TX_PIN PA2 | ||
|
||
#define USE_UART3 | ||
#define UART3_RX_PIN PB11 | ||
#define UART3_TX_PIN PB10 | ||
|
||
#define USE_UART4 | ||
#define UART4_RX_PIN PA1 | ||
#define UART4_TX_PIN PA0 | ||
|
||
#define USE_UART6 | ||
#define UART6_RX_PIN PC7 | ||
#define UART6_TX_PIN PC6 | ||
Comment on lines
+84
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove not broken out |
||
|
||
#define USE_UART7 | ||
#define UART7_RX_PIN PE7 | ||
#define UART7_TX_PIN PE8 | ||
|
||
#define USE_UART8 | ||
#define UART8_RX_PIN PE0 | ||
#define UART8_TX_PIN PC4 | ||
Comment on lines
+92
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove not broken out |
||
|
||
#define USE_SOFTSERIAL1 | ||
#define USE_SOFTSERIAL2 | ||
Comment on lines
+96
to
+97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove |
||
|
||
#define SERIAL_PORT_COUNT 11 //VCP, USART1, USART2, USART3, UART4, UART5, USART6, USART7, USART8, SOFTSERIAL x 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once u remove the unnecessary uarts this shkd be 6 |
||
|
||
#define USE_ESCSERIAL | ||
|
||
#define USE_SPI | ||
#define USE_SPI_DEVICE_1 | ||
#define USE_SPI_DEVICE_2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove spi2 |
||
#define USE_SPI_DEVICE_3 | ||
#define USE_SPI_DEVICE_4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Answer: 1 is for gyro, 2 is none, 3 is flash,4 is max osd chip There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the use spi 2 define it is messing with uart 1 i believe |
||
|
||
#define SPI1_SCK_PIN PA5 | ||
#define SPI1_MISO_PIN PA6 | ||
#define SPI1_MOSI_PIN PA7 | ||
|
||
#define SPI2_SCK_PIN PB13 | ||
#define SPI2_MISO_PIN PB14 | ||
#define SPI2_MOSI_PIN PB15 | ||
Comment on lines
+113
to
+115
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not used remove |
||
|
||
#define SPI3_SCK_PIN PC10 | ||
#define SPI3_MISO_PIN PC11 | ||
#define SPI3_MOSI_PIN PC12 | ||
|
||
#define SPI4_SCK_PIN PE2 | ||
#define SPI4_MISO_PIN PE5 | ||
#define SPI4_MOSI_PIN PE6 | ||
|
||
#define USE_MAX7456 | ||
#define MAX7456_SPI_INSTANCE SPI4 | ||
#define MAX7456_SPI_CS_PIN PE4 | ||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz | ||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST) | ||
|
||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT | ||
#define USE_FLASHFS | ||
#define USE_FLASH_M25P16 | ||
#define FLASH_CS_PIN PA15 | ||
#define FLASH_SPI_INSTANCE SPI3 | ||
|
||
#define USE_I2C | ||
#define USE_I2C_DEVICE_1 // External I2C | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the external i2c comment |
||
#define I2C_DEVICE (I2CDEV_1) | ||
#define I2C1_SCL PB8 | ||
#define I2C1_SDA PB9 | ||
|
||
#define USE_ADC | ||
#define VBAT_ADC_PIN PC3 | ||
#define CURRENT_METER_ADC_PIN PC2 | ||
#define RSSI_ADC_PIN PC5 | ||
|
||
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL | ||
#define SERIALRX_PROVIDER SERIALRX_SBUS | ||
|
||
#define TARGET_IO_PORTA 0xffff | ||
#define TARGET_IO_PORTB 0xffff | ||
#define TARGET_IO_PORTC 0xffff | ||
#define TARGET_IO_PORTD 0xffff | ||
#define TARGET_IO_PORTE 0xffff | ||
|
||
#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe timer 5 is missing ... uart 2 and 4 use this timer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
F7X5XG_TARGETS += $(TARGET) | ||
FEATURES += VCP ONBOARDFLASH | ||
|
||
TARGET_SRC = \ | ||
drivers/accgyro/accgyro_spi_mpu6000.c \ | ||
drivers/barometer/barometer_ms5611.c \ | ||
drivers/barometer/barometer_bmp280.c \ | ||
drivers/compass/compass_hmc5883l.c \ | ||
drivers/compass/compass_qmc5883l.c \ | ||
drivers/light_ws2811strip.c \ | ||
drivers/light_ws2811strip_hal.c \ | ||
drivers/max7456.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove changes