mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-21 05:02:51 +00:00
1. GPIO poweroff/restart 2. Generic SYSCON regmap poweroff/reboot mode/reboot 3. Emulator battery(thermal)/charger 4. GPIO charger Signed-off-by: GuEe-GUI <2991707448@qq.com>
34 lines
750 B
Python
34 lines
750 B
Python
from building import *
|
|
|
|
group = []
|
|
|
|
if not GetDepend(['RT_USING_POWER_RESET']):
|
|
Return('group')
|
|
|
|
cwd = GetCurrentDir()
|
|
CPPPATH = [cwd + '/../../include']
|
|
|
|
src = []
|
|
|
|
if GetDepend(['RT_POWER_RESET_GPIO_POWEROFF']):
|
|
src += ['gpio-poweroff.c']
|
|
|
|
if GetDepend(['RT_POWER_RESET_GPIO_RESTART']):
|
|
src += ['gpio-restart.c']
|
|
|
|
if GetDepend(['RT_POWER_RESET_REBOOT_MODE']):
|
|
src += ['reboot-mode.c']
|
|
|
|
if GetDepend(['RT_POWER_RESET_SYSCON_POWEROFF']):
|
|
src += ['syscon-poweroff.c']
|
|
|
|
if GetDepend(['RT_POWER_RESET_SYSCON_REBOOT_MODE']):
|
|
src += ['syscon-reboot-mode.c']
|
|
|
|
if GetDepend(['RT_POWER_RESET_SYSCON_REBOOT']):
|
|
src += ['syscon-reboot.c']
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
Return('group')
|