S32K3 DRDY less ambigious

This commit is contained in:
Peter van der Perk
2022-12-16 15:12:26 +01:00
committed by David Sidrane
parent 05dd43a8de
commit d945e87e4f
2 changed files with 3 additions and 1 deletions
@@ -245,6 +245,8 @@ enum class Bus {
using CS = GPIO::GPIOPin;
using DRDY = uint32_t;
#define DRDYInvalid 0
struct bus_device_external_cfg_t {
CS cs_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{};
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;
}