mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-13 12:28:47 +00:00
fix(core): remove backup ram deinit outside of FIXED_HW_DEINIT
[no changelog]
This commit is contained in:
parent
ab8aeaa102
commit
aa16fa71d6
@ -131,10 +131,10 @@ static void drivers_init(secbool *touch_initialized) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void drivers_deinit(void) {
|
static void drivers_deinit(void) {
|
||||||
#ifdef FIXED_HW_DEINIT
|
|
||||||
#ifdef USE_BACKUP_RAM
|
#ifdef USE_BACKUP_RAM
|
||||||
backup_ram_deinit();
|
backup_ram_deinit();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FIXED_HW_DEINIT
|
||||||
#ifdef USE_BUTTON
|
#ifdef USE_BUTTON
|
||||||
button_deinit();
|
button_deinit();
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,7 +99,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void drivers_init() {
|
void drivers_init() {
|
||||||
|
|
||||||
#ifdef USE_BACKUP_RAM
|
#ifdef USE_BACKUP_RAM
|
||||||
backup_ram_init();
|
backup_ram_init();
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,25 +17,23 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef USE_BACKUP_RAM
|
||||||
|
|
||||||
#include <rtl/cli.h>
|
#include <rtl/cli.h>
|
||||||
#include <sys/backup_ram.h>
|
#include <sys/backup_ram.h>
|
||||||
#include <sys/systick.h>
|
#include <sys/systick.h>
|
||||||
#include <trezor_rtl.h>
|
#include <trezor_rtl.h>
|
||||||
|
|
||||||
static void prodtest_backup_ram_write(cli_t* cli) {
|
static void prodtest_backup_ram_write(cli_t* cli) {
|
||||||
|
uint32_t soc = 0;
|
||||||
|
|
||||||
if (cli_arg_count(cli) != 1) {
|
if (!cli_arg_uint32(cli, "soc_percent", &soc) || soc > 100) {
|
||||||
cli_error_arg_count(cli);
|
cli_error_arg(cli, "Expecting soc_percent argument in range 0-100");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t soc = 0;
|
if (cli_arg_count(cli) > 1) {
|
||||||
|
cli_error_arg_count(cli);
|
||||||
cli_arg_uint32(cli, "soc_percent", &soc);
|
|
||||||
|
|
||||||
if (!cli_arg_uint32(cli, "soc_percent", &soc) ||
|
|
||||||
soc > 100) {
|
|
||||||
cli_error_arg(cli, "Expecting soc_percent argument in range 0-100");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,3 +140,5 @@ PRODTEST_CLI_CMD(
|
|||||||
.info = "Erase unused regions of backup RAM",
|
.info = "Erase unused regions of backup RAM",
|
||||||
.args = ""
|
.args = ""
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#endif // #ifdef USE_BACKUP_RAM
|
||||||
|
Loading…
Reference in New Issue
Block a user