mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
S32K3 Correct pinirq pinset for external interrupt
This commit is contained in:
parent
ffdf186598
commit
05dd43a8de
@ -210,6 +210,7 @@ CONFIG_S32K3XX_LPSPI2_PINCFG=3
|
||||
CONFIG_S32K3XX_LPSPI3=y
|
||||
CONFIG_S32K3XX_LPSPI3_PINCFG=3
|
||||
CONFIG_S32K3XX_LPSPI4=y
|
||||
CONFIG_S32K3XX_LPSPI4_DMA=y
|
||||
CONFIG_S32K3XX_LPSPI4_PINCFG=3
|
||||
CONFIG_S32K3XX_LPSPI5=y
|
||||
CONFIG_S32K3XX_LPSPI5_DMA=y
|
||||
@ -225,6 +226,7 @@ CONFIG_S32K3XX_LPUART9=y
|
||||
CONFIG_S32K3XX_LPUART_INVERT=y
|
||||
CONFIG_S32K3XX_LPUART_SINGLEWIRE=y
|
||||
CONFIG_S32K3XX_QSPI=y
|
||||
CONFIG_S32K3XX_WKPUINTS=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=249
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=1280
|
||||
|
||||
@ -71,10 +71,10 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin17})
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI4, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin16}, SPI::DRDY{GPIO::PortA, GPIO::Pin15, 551})
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin16}, SPI::DRDY{PIN_WKPU20})
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI5, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM20649, SPI::CS{GPIO::PortA, GPIO::Pin14}, SPI::DRDY{GPIO::PortA, GPIO::Pin13, 549})
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM20649, SPI::CS{GPIO::PortA, GPIO::Pin14}, SPI::DRDY{PIN_WKPU4})
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user