Navio2: modify for SPI-connected GPS and fix bug in GPIO driver

This commit is contained in:
Hidenori
2016-09-02 22:47:00 -04:00
committed by Lorenz Meier
parent b9728ecf39
commit 56ef984529
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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
}
}
+1 -1
View File
@@ -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;
}