Fixed resource ownership / define for SPI RX bind pin. (#8543)
Fixed resource ownership / define for SPI RX bind pin.
This commit is contained in:
commit
d1aabfcdcc
|
@ -43,7 +43,7 @@ void pgResetFn_rxSpiConfig(rxSpiConfig_t *rxSpiConfig)
|
|||
|
||||
rxSpiConfig->extiIoTag = IO_TAG(RX_SPI_EXTI_PIN);
|
||||
|
||||
rxSpiConfig->bindIoTag = IO_TAG(BINDPLUG_PIN);
|
||||
rxSpiConfig->bindIoTag = IO_TAG(RX_SPI_BIND_PIN);
|
||||
rxSpiConfig->ledIoTag = IO_TAG(RX_SPI_LED_PIN);
|
||||
#ifdef RX_SPI_LED_INVERTED
|
||||
rxSpiConfig->ledInversion = true;
|
||||
|
|
|
@ -51,7 +51,7 @@ void rxSpiCommonIOInit(const rxSpiConfig_t *rxSpiConfig)
|
|||
|
||||
if (rxSpiConfig->bindIoTag) {
|
||||
bindPin = IOGetByTag(rxSpiConfig->bindIoTag);
|
||||
IOInit(bindPin, OWNER_RX_BIND, 0);
|
||||
IOInit(bindPin, OWNER_RX_SPI_BIND, 0);
|
||||
IOConfigGPIO(bindPin, IOCFG_IPU);
|
||||
lastBindPinStatus = IORead(bindPin);
|
||||
} else {
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
#define RX_SPI_INSTANCE SPI2
|
||||
#define RX_NSS_PIN SPI2_NSS_PIN
|
||||
#define RX_SPI_EXTI_PIN PA8
|
||||
#define BINDPLUG_PIN PA9
|
||||
#define RX_SPI_BIND_PIN PA9
|
||||
#define RX_SPI_LED_PIN PA10
|
||||
#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_MOTOR_STOP)
|
||||
#elif defined(CRAZYBEEF3DX)
|
||||
|
@ -138,7 +138,7 @@
|
|||
#define RX_NSS_PIN SPI2_NSS_PIN
|
||||
#define RX_SPI_EXTI_PIN PA8
|
||||
#define RX_SPI_LED_PIN PA10
|
||||
#define BINDPLUG_PIN PA9
|
||||
#define RX_SPI_BIND_PIN PA9
|
||||
#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_MOTOR_STOP)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#define SPI2_MISO_PIN PB14
|
||||
#define SPI2_MOSI_PIN PB15
|
||||
#define RX_NSS_PIN SPI2_NSS_PIN
|
||||
#define BINDPLUG_PIN PA1
|
||||
#define RX_SPI_BIND_PIN PA1
|
||||
|
||||
|
||||
#define USE_I2C
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
#define USE_RX_SPI
|
||||
#define RX_SPI_INSTANCE SPI3
|
||||
|
||||
#define BINDPLUG_PIN PB2
|
||||
#define RX_SPI_BIND_PIN PB2
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_SPI
|
||||
|
||||
|
@ -106,7 +106,6 @@
|
|||
#define RX_SPI_LED_PIN PB9
|
||||
|
||||
#elif defined(CRAZYBEEF4FR)
|
||||
#define RX_CC2500_SPI_DISABLE_CHIP_DETECTION
|
||||
#define RX_SPI_EXTI_PIN PC14
|
||||
#define RX_SPI_LED_PIN PB9
|
||||
#define USE_RX_FRSKY_SPI_D
|
||||
|
|
|
@ -117,8 +117,7 @@
|
|||
|
||||
#define RX_CC2500_SPI_ANT_SEL_PIN PB2
|
||||
|
||||
|
||||
#define BINDPLUG_PIN PC13
|
||||
#define RX_SPI_BIND_PIN PC13
|
||||
|
||||
#define USE_ESCSERIAL
|
||||
#define ESCSERIAL_TIMER_TX_PIN PB9 // Motor 6, can't use escserial for hexa
|
||||
|
|
|
@ -301,6 +301,10 @@
|
|||
#define RX_SPI_EXTI_PIN NONE
|
||||
#endif
|
||||
|
||||
#if !defined(RX_SPI_BIND_PIN)
|
||||
#define RX_SPI_BIND_PIN NONE
|
||||
#endif
|
||||
|
||||
#if defined(USE_RX_CC2500)
|
||||
#if !defined(RX_CC2500_SPI_TX_EN_PIN)
|
||||
#define RX_CC2500_SPI_TX_EN_PIN NONE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Betaflight / STM32F411 (S411) 4.0.0 Mar 2 2019 / 21:03:37 (48d32d8b1) MSP API: 1.41
|
||||
# Betaflight / STM32F411 (S411) 4.1.0 Jul 8 2019 / 00:24:09 (5e6e1af0b) MSP API: 1.42
|
||||
|
||||
board_name CRAZYBEEF4FR
|
||||
manufacturer_id HAMO
|
||||
|
@ -19,7 +19,6 @@ resource SERIAL_TX 2 A02
|
|||
resource SERIAL_RX 1 A10
|
||||
resource SERIAL_RX 2 A03
|
||||
resource LED 1 C13
|
||||
resource RX_BIND_PLUG 1 B02
|
||||
resource SPI_SCK 1 A05
|
||||
resource SPI_SCK 2 B13
|
||||
resource SPI_SCK 3 B03
|
||||
|
@ -84,8 +83,6 @@ feature RX_SPI
|
|||
# master
|
||||
set rx_spi_protocol = FRSKY_X
|
||||
set rx_spi_bus = 3
|
||||
set rx_spi_led_inversion = OFF
|
||||
set adc_device = 1
|
||||
set motor_pwm_protocol = DSHOT600
|
||||
set current_meter = ADC
|
||||
set battery_meter = ADC
|
||||
|
@ -94,7 +91,6 @@ set beeper_inversion = ON
|
|||
set beeper_od = OFF
|
||||
set system_hse_mhz = 8
|
||||
set max7456_spi_bus = 2
|
||||
set cc2500_spi_chip_detect = ON
|
||||
set gyro_1_bustype = SPI
|
||||
set gyro_1_spibus = 1
|
||||
set gyro_1_sensor_align = CW90
|
||||
|
|
|
@ -19,7 +19,6 @@ resource SERIAL_TX 2 A02
|
|||
resource SERIAL_RX 1 A10
|
||||
resource SERIAL_RX 2 A03
|
||||
resource LED 1 C13
|
||||
resource RX_BIND 1 B02
|
||||
resource SPI_SCK 1 A05
|
||||
resource SPI_SCK 2 B13
|
||||
resource SPI_SCK 3 B03
|
||||
|
|
Loading…
Reference in New Issue