Skip to content

Commit

Permalink
safety_button驱动可以编译
Browse files Browse the repository at this point in the history
  • Loading branch information
ComerLater committed Aug 29, 2024
1 parent b05ebc2 commit e6721ba
Show file tree
Hide file tree
Showing 14 changed files with 11,373 additions and 9,580 deletions.
3 changes: 3 additions & 0 deletions apps/peripheral/actuator/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
menu "actuator"
orsource "*/Kconfig"
endmenu
2 changes: 2 additions & 0 deletions apps/peripheral/battery/Kconfig
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
menu "battery"
orsource "*/Kconfig"
endmenu
3 changes: 3 additions & 0 deletions apps/peripheral/notification/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
menu "notification"
orsource "*/Kconfig"
endmenu
42 changes: 0 additions & 42 deletions apps/peripheral/notification/safety_button/CMakeLists.txt

This file was deleted.

17 changes: 15 additions & 2 deletions apps/peripheral/notification/safety_button/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
menuconfig DRIVERS_SAFETY_BUTTON
menuconfig DRV_USING_SAFETY_BUTTON
bool "safety_button"
select PKG_USING_BUTTON_PUBLISHER
default n
---help---
Enable support for safety_button
Enable support for safety_button

if DRV_USING_SAFETY_BUTTON
comment "fast get pin number: (x - A) * 16 + n"
config GPIO_SAFETY_SWITCH_IN
int "safety button in pin (PE10=74)"
default 74

config GPIO_SAFETY_SWITCH_LED
int "safety led out pin (PE12=76)"
default 76

endif
13 changes: 13 additions & 0 deletions apps/peripheral/notification/safety_button/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import os
import sys
import subprocess
from building import *

cwd = GetCurrentDir()

inc = []
src = Glob("*.cpp")

objs = DefineGroup("drv/safty_button", src, depend=["DRV_USING_SAFETY_BUTTON"])

Return("objs")
Loading

0 comments on commit e6721ba

Please sign in to comment.