mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Making naming of UART / USART inverter defines consistent again.
This commit is contained in:
parent
9b62a4e38f
commit
de7e72df14
18 changed files with 34 additions and 35 deletions
|
@ -43,16 +43,16 @@ static void initInverter(ioTag_t ioTag)
|
|||
|
||||
void initInverters(void)
|
||||
{
|
||||
#ifdef INVERTER_PIN_USART1
|
||||
initInverter(IO_TAG(INVERTER_PIN_USART1));
|
||||
#ifdef INVERTER_PIN_UART1
|
||||
initInverter(IO_TAG(INVERTER_PIN_UART1));
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_USART2
|
||||
initInverter(IO_TAG(INVERTER_PIN_USART2));
|
||||
#ifdef INVERTER_PIN_UART2
|
||||
initInverter(IO_TAG(INVERTER_PIN_UART2));
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_USART3
|
||||
initInverter(IO_TAG(INVERTER_PIN_USART3));
|
||||
#ifdef INVERTER_PIN_UART3
|
||||
initInverter(IO_TAG(INVERTER_PIN_UART3));
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_UART4
|
||||
|
@ -63,8 +63,8 @@ void initInverters(void)
|
|||
initInverter(IO_TAG(INVERTER_PIN_UART5));
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_USART6
|
||||
initInverter(IO_TAG(INVERTER_PIN_USART6));
|
||||
#ifdef INVERTER_PIN_UART6
|
||||
initInverter(IO_TAG(INVERTER_PIN_UART6));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -73,21 +73,21 @@ void enableInverter(USART_TypeDef *USARTx, bool on)
|
|||
#ifdef USE_INVERTER
|
||||
IO_t pin = IO_NONE;
|
||||
|
||||
#ifdef INVERTER_PIN_USART1
|
||||
#ifdef INVERTER_PIN_UART1
|
||||
if (USARTx == USART1) {
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_USART1));
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_UART1));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_USART2
|
||||
#ifdef INVERTER_PIN_UART2
|
||||
if (USARTx == USART2) {
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_USART2));
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_UART2));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_USART3
|
||||
#ifdef INVERTER_PIN_UART3
|
||||
if (USARTx == USART3) {
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_USART3));
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_UART3));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -103,9 +103,9 @@ void enableInverter(USART_TypeDef *USARTx, bool on)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef INVERTER_PIN_USART6
|
||||
#ifdef INVERTER_PIN_UART6
|
||||
if (USARTx == USART6) {
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_USART6));
|
||||
pin = IOGetByTag(IO_TAG(INVERTER_PIN_UART6));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if defined(INVERTER_PIN_USART1) || defined(INVERTER_PIN_USART2) || defined(INVERTER_PIN_USART3) || defined(INVERTER_PIN_UART4) || defined(INVERTER_PIN_UART5) || defined(INVERTER_PIN_USART6)
|
||||
#if defined(INVERTER_PIN_UART1) || defined(INVERTER_PIN_UART2) || defined(INVERTER_PIN_UART3) || defined(INVERTER_PIN_UART4) || defined(INVERTER_PIN_UART5) || defined(INVERTER_PIN_UART6)
|
||||
#define USE_INVERTER
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#define BEEPER PC13
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART2 PC15
|
||||
#define INVERTER_PIN_UART2 PC15
|
||||
|
||||
// MPU interrupt
|
||||
#define USE_EXTI
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
#define BEEPER_OPT PB7
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART6 PB15
|
||||
//#define INVERTER_PIN_USART1 PC9
|
||||
#define INVERTER_PIN_UART6 PB15
|
||||
//#define INVERTER_PIN_UART1 PC9
|
||||
|
||||
#define UART1_INVERTER PC9
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#define LED0 PB3
|
||||
|
||||
#define INVERTER_PIN_USART1 PB2 // PB2 (BOOT1) used as inverter select GPIO
|
||||
#define INVERTER_PIN_UART1 PB2 // PB2 (BOOT1) used as inverter select GPIO
|
||||
|
||||
#define BEEPER PA15
|
||||
#define BEEPER_OPT PA2
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#define BEEPER PC5
|
||||
|
||||
#define INVERTER_PIN_USART2 PB2 // PB2 used as inverter select GPIO
|
||||
#define INVERTER_PIN_UART2 PB2 // PB2 used as inverter select GPIO
|
||||
|
||||
#define MPU6000_CS_PIN PC4
|
||||
#define MPU6000_SPI_INSTANCE SPI1
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#define BEEPER PE5
|
||||
|
||||
#define INVERTER_PIN_USART6 PD3
|
||||
#define INVERTER_PIN_UART6 PD3
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define BEEPER PC15
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART6 PC8
|
||||
#define INVERTER_PIN_UART6 PC8
|
||||
|
||||
#define USE_EXTI
|
||||
#define MPU_INT_EXTI PC4
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define BEEPER PA8
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART1 PC0 // PC0 used as inverter select GPIO
|
||||
#define INVERTER_PIN_UART1 PC0 // PC0 used as inverter select GPIO
|
||||
|
||||
// MPU6000 interrupts
|
||||
#define USE_EXTI
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#define BEEPER PA8
|
||||
|
||||
#define INVERTER_PIN_USART1 PC0 // PC0 used as inverter select GPIO
|
||||
#define INVERTER_PIN_UART1 PC0 // PC0 used as inverter select GPIO
|
||||
|
||||
// MPU6000 interrupts
|
||||
#define USE_EXTI
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define BARO_XCLR_PIN PC13
|
||||
#define BARO_EOC_PIN PC14
|
||||
|
||||
#define INVERTER_PIN_USART2 PB2 // PB2 (BOOT1) abused as inverter select GPIO
|
||||
#define INVERTER_PIN_UART2 PB2 // PB2 (BOOT1) abused as inverter select GPIO
|
||||
|
||||
#define USE_EXTI
|
||||
#define MAG_INT_EXTI PC14
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
//#define BARO_XCLR_PIN PC13
|
||||
//#define BARO_EOC_PIN PC14
|
||||
|
||||
#define INVERTER_PIN_USART2 PB2 // PB2 (BOOT1) abused as inverter select GPIO
|
||||
#define INVERTER_PIN_UART2 PB2 // PB2 (BOOT1) abused as inverter select GPIO
|
||||
|
||||
#define USE_EXTI
|
||||
#define MAG_INT_EXTI PC14
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define BEEPER PB4
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART1 PC0 // PC0 used as inverter select GPIO
|
||||
#define INVERTER_PIN_UART1 PC0 // PC0 used as inverter select GPIO
|
||||
|
||||
#define MPU6000_CS_PIN PA4
|
||||
#define MPU6000_SPI_INSTANCE SPI1
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#endif
|
||||
|
||||
// PC0 used as inverter select GPIO
|
||||
#define INVERTER_PIN_USART1 PC0
|
||||
#define INVERTER_PIN_UART1 PC0
|
||||
|
||||
#define MPU6000_CS_PIN PA4
|
||||
#define MPU6000_SPI_INSTANCE SPI1
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#define BEEPER PC13
|
||||
|
||||
#define INVERTER_PIN_USART2 PC15 //Sbus on USART 2 of nano.
|
||||
#define INVERTER_PIN_UART2 PC15 //Sbus on USART 2 of nano.
|
||||
|
||||
#define MPU6500_CS_PIN PB12
|
||||
#define MPU6500_SPI_INSTANCE SPI2
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define BEEPER PC9
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART6 PC6
|
||||
#define INVERTER_PIN_UART6 PC6
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define BEEPER PA0
|
||||
#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART6 PD7
|
||||
#define INVERTER_PIN_UART6 PD7
|
||||
|
||||
#define MPU6500_CS_PIN PE10
|
||||
#define MPU6500_SPI_INSTANCE SPI2
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
#define BEEPER PC9
|
||||
//#define BEEPER_INVERTED
|
||||
|
||||
#define INVERTER_PIN_USART6 PB15
|
||||
|
||||
#define INVERTER_PIN_UART6 PB15
|
||||
|
||||
// Gyro interrupt
|
||||
#define USE_EXTI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue