Skip to content

Commit

Permalink
fixup! feat(core/prodtest): add tamper testing function
Browse files Browse the repository at this point in the history
  • Loading branch information
TychoVrahe committed Mar 3, 2025
1 parent 42f598e commit 98a6ce3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/embed/projects/prodtest/cmd/prodtest_tamper.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
#include <sys/tamper.h>

static void prodtest_tamper_read(cli_t* cli) {
if (cli_arg_count(cli) > 0) {
cli_error_arg_count(cli);
return;
}

bool init_ok = tamper_init();

if (!init_ok) {
cli_error(cli, CLI_ERROR, "Cannot initialize tamper driver.");
return;
}

uint8_t val = tamper_external_read();

cli_ok(cli, "%d", val);
Expand Down

0 comments on commit 98a6ce3

Please sign in to comment.