Skip to content

Commit

Permalink
[target] update NERO
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter committed Apr 3, 2024
1 parent 5676f6e commit 33af6fb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
18 changes: 9 additions & 9 deletions src/main/target/NERO/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
#include "drivers/timer_def.h"

const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM3, CH2, PC7, TIM_USE_PPM, 0, 0 ),
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0 ),
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0 ),
DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0 ),
DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 1 ),
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR | TIM_USE_LED, 0, 0 ),
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0 ),
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0 ),
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0 ),
DEF_TIM(TIM3, CH2, PC7, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 1
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 2
DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 3
DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0), // motor 4
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR | TIM_USE_LED, 0, 0), // motor 5 and LED_STRIP
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 7
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8
};
21 changes: 17 additions & 4 deletions src/main/target/NERO/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,30 @@
*/

#pragma once
#define TARGET_BOARD_IDENTIFIER "NERO"
#define TARGET_MANUFACTURER_IDENTIFIER "BKMN"
#define USBD_PRODUCT_STRING "NERO"

#define USBD_PRODUCT_STRING "NERO"
#define FC_TARGET_MCU STM32F7X2 // not used in EmuF
#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID

#define USE_ACC
#define USE_ACC_SPI_MPU6500
#define USE_ACC_SPI_ICM20602 // detected by MPU6500 code
#define USE_GYRO
#define USE_GYRO_SPI_MPU6500
#define USE_GYRO_SPI_ICM20602 // detected by MPU6500 code
#define USE_SDCARD

#define HW_PIN PB2

#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC

#define USE_LED
#define LED0_PIN PB6
#define LED1_PIN PB5
#define LED2_PIN PB4
#define LED_STRIP_PIN PB0 // Shared with MOTOR5_PIN
#define MOTOR5_PIN PB0 // Shared with LED_STRIP_PIN

#define USE_BEEPER
#define BEEPER_PIN PC1
Expand All @@ -55,7 +68,7 @@
#define GYRO_MPU6500_ALIGN CW0_DEG

#define USE_SDCARD

#define USE_SDCARD_SDIO
#define SDCARD_DETECT_INVERTED
#define SDCARD_DETECT_PIN PD2
#define SDCARD_SPI_INSTANCE SPI3
Expand Down Expand Up @@ -124,7 +137,7 @@

#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT

#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL)
#define SERIALRX_PROVIDER SERIALRX_SBUS
#define SERIALRX_UART SERIAL_PORT_USART6

Expand Down
10 changes: 7 additions & 3 deletions src/main/target/NERO/target.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
F7X2RE_TARGETS += $(TARGET)
FEATURES += SDCARD VCP
FEATURES += VCP SDCARD

TARGET_SRC = \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/accgyro/accgyro_mpu6500.c
drivers/accgyro/accgyro_mpu.c \
drivers/accgyro/accgyro_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/light_led.h \
drivers/light_ws2811strip.c \
drivers/max7456.c \

0 comments on commit 33af6fb

Please sign in to comment.