mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 06:04:08 +08:00
px4fmu-v5:Comment and define SAFETY LED and Button so FMU can use
Safety Switch is HW version dependent on having an PX4IO So we init to a benign state with the _INIT definition and provide the the non _INIT one for the driver to make a run time decision to use it. We also define the FMU GPIO_BTN_SAFETY and GPIO_LED_SAFETY alias so the px4fmu will drrive will be built with the safety switch code at compile time and have runtime control via the manifest
This commit is contained in:
parent
c9cf17c432
commit
1db1155697
@ -555,13 +555,20 @@
|
||||
|
||||
#define GPIO_RSSI_IN /* PB0 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN0)
|
||||
#define GPIO_RSSI_IN_INIT /* PB0 */ 0 /* Leave as ADC RSSI_IN */
|
||||
/* Change GPIO_nSAFETY_SWITCH_LED_OUT to
|
||||
* (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN12)
|
||||
* to enable the safety switch led on FMU
|
||||
|
||||
/* Safety Switch is HW version dependent on having an PX4IO
|
||||
* So we init to a benign state with the _INIT definition
|
||||
* and provide the the non _INIT one for the driver to make a run time
|
||||
* decision to use it.
|
||||
*/
|
||||
#define GPIO_nSAFETY_SWITCH_LED_OUT /* PE12 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN12)
|
||||
#define GPIO_nSAFETY_SWITCH_LED_OUT_INIT /* PE12 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN12)
|
||||
#define GPIO_nSAFETY_SWITCH_LED_OUT /* PE12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN12)
|
||||
|
||||
/* Enable the FMU to control it if there is no px4io fixme:This should be BOARD_SAFETY_LED(__ontrue) */
|
||||
#define GPIO_LED_SAFETY GPIO_nSAFETY_SWITCH_LED_OUT
|
||||
#define GPIO_SAFETY_SWITCH_IN /* PE10 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTE|GPIO_PIN10)
|
||||
/* Enable the FMU to use the switch it if there is no px4io fixme:This should be BOARD_SAFTY_BUTTON() */
|
||||
#define GPIO_BTN_SAFETY GPIO_SAFETY_SWITCH_IN /* Enable the FMU to control it if there is no px4io */
|
||||
|
||||
/* Power switch controls ******************************************************/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user