HAL_ChibiOS: use DRDY pin for ADIS16470 on mRoNexus

This commit is contained in:
Andrew Tridgell 2020-04-22 15:58:35 +10:00
parent 5c6749ee54
commit ffe773ff6f
2 changed files with 10 additions and 7 deletions

View File

@ -363,8 +363,9 @@ bool GPIO::wait_pin(uint8_t pin, INTERRUPT_TRIGGER_TYPE mode, uint32_t timeout_u
g->thd_wait = nullptr;
_attach_interruptI(g->pal_line,
palcallback_t(nullptr),
g,
nullptr,
mode);
osalSysUnlock();
return msg != MSG_TIMEOUT;
return msg == MSG_OK;
}

View File

@ -125,10 +125,12 @@ define BOARD_PWM_COUNT_DEFAULT 0
# This is the invensense data-ready pin. We don't use it in the
# default driver.
PD8 DRDY_ADIS16470 INPUT
PD8 DRDY_ADIS16470 INPUT GPIO(93)
PE13 DRDY_ICM40609D INPUT
PC13 DRDY_RM3100 INPUT
define HAL_DRDY_ADIS16470_PIN 93
# This is the reset line for the adis16470
PB1 nRST_ADIS OUTPUT HIGH GPIO(74)
@ -166,16 +168,16 @@ define HAL_GPIO_LED_ON 0
define HAL_GPIO_LED_OFF 1
# LED setup for PixracerLED driver
PA6 LED_R OUTPUT HIGH GPIO(0)
PA7 LED_G OUTPUT HIGH GPIO(1)
PB0 LED_B OUTPUT HIGH GPIO(2)
PA6 LED_R OUTPUT HIGH GPIO(0)
PA7 LED_G OUTPUT HIGH GPIO(1)
PB0 LED_B OUTPUT HIGH GPIO(2)
define HAL_GPIO_A_LED_PIN 0
define HAL_GPIO_B_LED_PIN 1
define HAL_GPIO_C_LED_PIN 2
# 2 IMUs (Analog Devices ADIS16470 and Invensense / TDK ICM40609D)
IMU ADIS1647x SPI:adis16470 ROTATION_ROLL_180
IMU ADIS1647x SPI:adis16470 ROTATION_ROLL_180 HAL_DRDY_ADIS16470_PIN
# IMU Invensense SPI:icm40609d ROTATION_NONE
#! ^^Need to confirm orientation