diff --git a/src/core/target.h b/src/core/target.h index 3d1fbc883..ccdea4258 100644 --- a/src/core/target.h +++ b/src/core/target.h @@ -115,6 +115,17 @@ typedef struct { MEMBER(port, uint8_t) \ MEMBER(nss, gpio_pins_t) +typedef struct { + spi_ports_t port; + gpio_pins_t nss; + gpio_pins_t exti; +} target_gyro_spi_device_t; + +#define TARGET_SPI_DEVICE_MEMBERS \ + MEMBER(port, uint8_t) \ + MEMBER(nss, gpio_pins_t) \ + MEMBER(exti, gpio_pins_t) + typedef struct { spi_ports_t port; gpio_pins_t nss; @@ -148,7 +159,7 @@ typedef struct { target_serial_port_t serial_soft_ports[SERIAL_SOFT_COUNT]; target_spi_port_t spi_ports[SPI_PORT_MAX]; - target_spi_device_t gyro; + target_gyro_spi_device_t gyro; uint8_t gyro_orientation; target_spi_device_t osd; target_spi_device_t flash;