mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 09:00:34 +08:00
Navio2: modify for SPI-connected GPS and fix bug in GPIO driver
This commit is contained in:
@@ -374,7 +374,7 @@ int GPS::pollOrRead(uint8_t *buf, size_t buf_length, int timeout)
|
||||
{
|
||||
handleInjectDataTopic();
|
||||
|
||||
#ifndef __PX4_QURT
|
||||
#if !defined(__PX4_QURT) || !defined(__PX4_POSIX_RPI)
|
||||
|
||||
/* For non QURT, use the usual polling. */
|
||||
|
||||
@@ -807,6 +807,7 @@ GPS::task_main()
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(__PX4_POSIX_RPI)
|
||||
/* select next mode */
|
||||
switch (_mode) {
|
||||
case GPS_DRIVER_MODE_UBX:
|
||||
@@ -824,6 +825,7 @@ GPS::task_main()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ int Gpio::configgpio(uint32_t pinset)
|
||||
addr = (uintptr_t)_gpio_map + GPIO_GPFSEL0_OFFSET + pin / 10;
|
||||
shift = (pin % 10) * 3;
|
||||
|
||||
atomic_modify(addr, shift, GPIO_CNF_MASK, cnf);
|
||||
atomic_modify(addr, shift, GPIO_CNF_MASK >> GPIO_CNF_SHIFT, cnf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user