mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 01:04:19 +08:00
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:
committed by
Lorenz Meier
parent
9002581ad4
commit
44cb1afa4d
@@ -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
|
||||
************************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user