S32K3 Correct pinirq pinset for external interrupt

This commit is contained in:
Peter van der Perk
2022-12-16 12:02:44 -05:00
committed by David Sidrane
parent ffdf186598
commit 05dd43a8de
4 changed files with 7 additions and 7 deletions
@@ -131,7 +131,6 @@ enum Pin {
struct GPIOPin {
Port port;
Pin pin;
uint16_t imcr;
};
}
@@ -244,7 +243,7 @@ enum class Bus {
};
using CS = GPIO::GPIOPin;
using DRDY = GPIO::GPIOPin;
using DRDY = uint32_t;
struct bus_device_external_cfg_t {
CS cs_gpio;
@@ -45,9 +45,8 @@ 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.port != GPIO::PortInvalid) {
ret.drdy_gpio = getGPIOPort(drdy_gpio.port) | getGPIOPin(drdy_gpio.pin) | getIMCR(drdy_gpio.imcr) |
(GPIO_PULLUP | PIN_INT_BOTH);
if (drdy_gpio != 0) {
ret.drdy_gpio = drdy_gpio;
}
if (PX4_SPIDEVID_TYPE(devid) == 0) { // it's a PX4 device (internal or external)