mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 18:07:25 +08:00
[settings] Support functions (#2880)
* [chibios] Add reboot functionality * [modules] Add power switch module
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</description>
|
||||
</doc>
|
||||
<dep>
|
||||
<depends>i2c,baro_board_common</depends>
|
||||
<depends>i2c,baro_board_common,power_switch</depends>
|
||||
<provides>baro</provides>
|
||||
</dep>
|
||||
<makefile target="!sim|nps|fbw">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</description>
|
||||
</doc>
|
||||
<dep>
|
||||
<depends>i2c,baro_board_common,hard_fault_recovery</depends>
|
||||
<depends>i2c,baro_board_common,hard_fault_recovery,power_switch</depends>
|
||||
<provides>baro</provides>
|
||||
</dep>
|
||||
<makefile target="!sim|nps|fbw">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<depends>spi_master,baro_ms5611_spi</depends>
|
||||
</dep>
|
||||
<makefile target="!sim|nps|fbw">
|
||||
<define name="USE_RTC_BACKUP" value="TRUE"/>
|
||||
<configure name="SDLOG_USE_RTC" value="FALSE"/>
|
||||
<configure name="MS5611_SPI_DEV" value="spi1"/> <!-- spi4 -->
|
||||
<configure name="MS5611_SLAVE_IDX" value="SPI_SLAVE6"/> <!-- SPI_SLAVE4 -->
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<depends>spi_master,baro_board</depends>
|
||||
</dep>
|
||||
<makefile target="!sim|nps|fbw">
|
||||
<define name="USE_RTC_BACKUP" value="TRUE"/>
|
||||
<configure name="SDLOG_USE_RTC" value="FALSE"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="power_switch" dir="boards">
|
||||
<doc>
|
||||
<description>Simple power switch module to set a specific GPIO pin</description>
|
||||
</doc>
|
||||
<settings>
|
||||
<dl_settings>
|
||||
<dl_settings NAME="Board">
|
||||
<dl_setting var="power_switch_status" min="0" step="1" max="1" shortname="pwr_switch" values="OFF|ON" handler="set" module="boards/power_switch"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
<header>
|
||||
<file name="power_switch.h"/>
|
||||
</header>
|
||||
<init fun="power_switch_init()"/>
|
||||
<makefile>
|
||||
<file name="power_switch.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
Reference in New Issue
Block a user