Skip to content

Commit

Permalink
fixup! feat(core/prodtest): add hw-revision command and driver
Browse files Browse the repository at this point in the history
  • Loading branch information
TychoVrahe committed Mar 3, 2025
1 parent 0566dc4 commit 5196a69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/embed/projects/prodtest/cmd/prodtest_hw_revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
static void prodtest_hw_revision(cli_t* cli) {
uint8_t rev = hw_revision_get();

if (cli_arg_count(cli) > 0) {
cli_error_arg_count(cli);
return;
}

cli_ok(cli, "%d", rev);
}

Expand Down
2 changes: 1 addition & 1 deletion core/embed/util/hw_revision/stm32/hw_revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ typedef struct {

static hw_revision_t g_hw_revision;

uint8_t hw_revision_read(void) {
static uint8_t hw_revision_read(void) {
bool rev0 =
GPIO_PIN_SET == HAL_GPIO_ReadPin(HW_REVISION_0_PORT, HW_REVISION_0_PIN);
bool rev1 =
Expand Down

0 comments on commit 5196a69

Please sign in to comment.