Provide an overidable nop default for BOARD_EEPROM_WP_CTRL

To simplify integration of an EEPROM device with a Write Protect
  control pin, we add an overidable BOARD_EEPROM_WP_CTRL macro
  the does nothing.

  A board that provids the GPIO for WP should define
  BOARD_EEPROM_WP_CTRL(_protected_true) that will set the WP GPIO
  to the Protected state when passed true.
This commit is contained in:
David Sidrane
2017-01-19 13:50:36 -10:00
committed by Lorenz Meier
parent 9002581ad4
commit 44cb1afa4d
+6
View File
@@ -92,6 +92,12 @@
#define PX4_SPI_BUS_ID(bd) (((bd) >> 4) & 0xf)
#define PX4_SPI_DEV_ID(bd) ((bd) & 0xf)
/* Provide an overridable default nop
* for BOARD_EEPROM_WP_CTRL
*/
#if !defined(BOARD_EEPROM_WP_CTRL)
# define BOARD_EEPROM_WP_CTRL(on_true)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/