Browse Source

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.
sbg
David Sidrane 8 years ago committed by Lorenz Meier
parent
commit
44cb1afa4d
  1. 6
      src/drivers/boards/common/board_common.h

6
src/drivers/boards/common/board_common.h

@ -92,6 +92,12 @@ @@ -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
************************************************************************************/

Loading…
Cancel
Save