Kaynağa Gözat

Added pinio config to F722 target

Nicole Portas 1 yıl önce
ebeveyn
işleme
d755fa5b70

+ 36 - 0
patch/inav/src/main/target/IFLIGHT_BLITZ_F722/target.c

@@ -0,0 +1,36 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdint.h>
+#include "platform.h"
+#include "drivers/bus.h"
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+#include "drivers/pinio.h"
+
+timerHardware_t timerHardware[] = {
+    DEF_TIM(TIM3, CH4, PB1,   TIM_USE_OUTPUT_AUTO, 0, 0),  // S1 DMA1_S2_CH5
+    DEF_TIM(TIM3, CH3, PB0,   TIM_USE_OUTPUT_AUTO, 0, 0),  // S2 DMA1_S7_CH5
+
+    DEF_TIM(TIM8, CH3, PC8,   TIM_USE_OUTPUT_AUTO, 0, 1),  // S3 DMA2_S4_CH7
+    DEF_TIM(TIM8, CH4, PC9,   TIM_USE_OUTPUT_AUTO, 0, 0),  // S4 DMA2_S7_CH7
+
+    DEF_TIM(TIM1, CH1, PA8,  TIM_USE_LED,                         0, 0),  // WS2812B
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);

+ 9 - 1
patch/inav/src/main/target/IFLIGHT_BLITZ_F722/target.h

@@ -26,7 +26,7 @@
 #define BEEPER_INVERTED
 
 #define USE_LIGHTS
-#define LIGHTS_PIN      PA6 // Use PA6 pin as output
+#define LIGHTS_PIN      PB6 // Use PB6 pin as output
 
 // *************** SPI1 Gyro & ACC *******************
 #define USE_SPI
@@ -140,6 +140,14 @@
 #define VBAT_ADC_CHANNEL            ADC_CHN_1
 #define CURRENT_METER_ADC_CHANNEL   ADC_CHN_2
 
+// *************** PINIO ***************************
+
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN                  PB7
+#define PINIO2_PIN                  PB10
+#define PINIO3_PIN                  PB11
+
 // *************** LEDSTRIP ************************
 #define USE_LED_STRIP
 #define WS2811_PIN                  PA8