FMU gpio operations now conditional on BOARD_FMU_GPIO_TAB in board_config

return -EINVAL on any GPIO ioctl operation when there are
       no GPIO pins defined in the board config. I.E.
       BOARD_FMU_GPIO_TAB is not defined.

       BOARD_FMU_GPIO_TAB is now optional and if it is defined
       then the logical BOARD_HAS_FMU_GPIO is defined and
       will enable the px4fmu driver to perform the physical GPIO
       operations.
This commit is contained in:
David Sidrane
2017-01-21 11:45:36 +01:00
committed by Lorenz Meier
parent 216ec6513a
commit 33486d5047
2 changed files with 69 additions and 36 deletions
+17
View File
@@ -132,6 +132,23 @@
# define BOARD_EEPROM_WP_CTRL(on_true)
#endif
/* Conditional use of FMU GPIO
* If the board use the PX4FMU driver and the board provides
* BOARD_FMU_GPIO_TAB then we publish the logical BOARD_HAS_FMU_GPIO
*/
#if defined(BOARD_FMU_GPIO_TAB)
# define BOARD_HAS_FMU_GPIO
#endif
/* Conditional use of PX4 PIO is Used to determine if the board
* has a PX4PIO processor.
* We then publish the logical BOARD_USES_PX4PIO
*/
#if defined(PX4IO_SERIAL_DEVICE)
# define BOARD_USES_PX4PIO 1
#endif
/************************************************************************************
* Private Functions
************************************************************************************/