mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-27 13:35:44 +00:00
powerctl emulator
This commit is contained in:
parent
4de53a3e3f
commit
0ef7d0634c
@ -43,6 +43,7 @@ backlight = []
|
|||||||
usb = []
|
usb = []
|
||||||
optiga = []
|
optiga = []
|
||||||
ble = []
|
ble = []
|
||||||
|
powerctl = []
|
||||||
translations = ["crypto"]
|
translations = ["crypto"]
|
||||||
test = [
|
test = [
|
||||||
"backlight",
|
"backlight",
|
||||||
|
30
core/embed/sys/powerctl/unix/powerctl.c
Normal file
30
core/embed/sys/powerctl/unix/powerctl.c
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Trezor project, https://trezor.io/
|
||||||
|
*
|
||||||
|
* Copyright (c) SatoshiLabs
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <trezor_rtl.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
|
bool powerctl_hibernate(void) {
|
||||||
|
|
||||||
|
exit(1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
@ -58,6 +58,13 @@ def configure(
|
|||||||
features_available.append("touch")
|
features_available.append("touch")
|
||||||
defines += [("USE_TOUCH", "1")]
|
defines += [("USE_TOUCH", "1")]
|
||||||
|
|
||||||
|
sources += [
|
||||||
|
"embed/sys/powerctl/unix/powerctl.c",
|
||||||
|
]
|
||||||
|
defines += [("USE_POWERCTL", "1")]
|
||||||
|
paths += ["embed/sys/powerctl/inc"]
|
||||||
|
features_available.append("powerctl")
|
||||||
|
|
||||||
features_available.append("backlight")
|
features_available.append("backlight")
|
||||||
defines += [("USE_BACKLIGHT", "1")]
|
defines += [("USE_BACKLIGHT", "1")]
|
||||||
|
|
||||||
|
@ -235,6 +235,7 @@ def configure(
|
|||||||
]
|
]
|
||||||
paths += ["embed/sys/powerctl/inc"]
|
paths += ["embed/sys/powerctl/inc"]
|
||||||
defines += [("USE_POWERCTL", "1")]
|
defines += [("USE_POWERCTL", "1")]
|
||||||
|
features_available.append("powerctl")
|
||||||
|
|
||||||
env.get("ENV")["LINKER_SCRIPT"] = linker_script
|
env.get("ENV")["LINKER_SCRIPT"] = linker_script
|
||||||
|
|
||||||
|
@ -240,6 +240,7 @@ def configure(
|
|||||||
]
|
]
|
||||||
paths += ["embed/sys/powerctl/inc"]
|
paths += ["embed/sys/powerctl/inc"]
|
||||||
defines += [("USE_POWERCTL", "1")]
|
defines += [("USE_POWERCTL", "1")]
|
||||||
|
features_available.append("powerctl")
|
||||||
|
|
||||||
env.get("ENV")["LINKER_SCRIPT"] = linker_script
|
env.get("ENV")["LINKER_SCRIPT"] = linker_script
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user