mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 10:21:36 +08:00
S32K3 DRDY less ambigious
This commit is contained in:
committed by
David Sidrane
parent
05dd43a8de
commit
d945e87e4f
@@ -245,6 +245,8 @@ enum class Bus {
|
|||||||
using CS = GPIO::GPIOPin;
|
using CS = GPIO::GPIOPin;
|
||||||
using DRDY = uint32_t;
|
using DRDY = uint32_t;
|
||||||
|
|
||||||
|
#define DRDYInvalid 0
|
||||||
|
|
||||||
struct bus_device_external_cfg_t {
|
struct bus_device_external_cfg_t {
|
||||||
CS cs_gpio;
|
CS cs_gpio;
|
||||||
DRDY drdy_gpio;
|
DRDY drdy_gpio;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ static inline constexpr px4_spi_bus_device_t initSPIDevice(uint32_t devid, SPI::
|
|||||||
px4_spi_bus_device_t ret{};
|
px4_spi_bus_device_t ret{};
|
||||||
ret.cs_gpio = getGPIOPort(cs_gpio.port) | getGPIOPin(cs_gpio.pin) | (GPIO_LOWDRIVE | GPIO_OUTPUT_ONE);
|
ret.cs_gpio = getGPIOPort(cs_gpio.port) | getGPIOPin(cs_gpio.pin) | (GPIO_LOWDRIVE | GPIO_OUTPUT_ONE);
|
||||||
|
|
||||||
if (drdy_gpio != 0) {
|
if (drdy_gpio != DRDYInvalid) {
|
||||||
ret.drdy_gpio = drdy_gpio;
|
ret.drdy_gpio = drdy_gpio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user