Skip to content

Commit

Permalink
feat(prodtest): refactor and improve prodtest
Browse files Browse the repository at this point in the history
  • Loading branch information
cepetr committed Jan 30, 2025
1 parent 5adb8ef commit 818e0a4
Show file tree
Hide file tree
Showing 37 changed files with 4,156 additions and 1,667 deletions.
28 changes: 22 additions & 6 deletions core/SConscript.prodtest
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ SOURCE_MOD += [
'embed/util/image/image.c',
'embed/util/rsod/rsod.c',
'embed/util/scm_revision/scm_revision.c',
'embed/rtl/cli.c',
'embed/rtl/error_handling.c',
'embed/rtl/mini_printf.c',
'embed/rtl/strutils.c',
'vendor/micropython/lib/uzlib/adler32.c',
'vendor/micropython/lib/uzlib/crc32.c',
'vendor/micropython/lib/uzlib/tinflate.c',
Expand All @@ -98,14 +100,28 @@ FEATURES_AVAILABLE = models.configure_board(TREZOR_MODEL, HW_REVISION, FEATURES_
SOURCE_PRODTEST = [
'embed/projects/prodtest/header.S',
'embed/projects/prodtest/main.c',
'embed/projects/prodtest/prodtest_common.c',
'embed/projects/prodtest/cmd/prodtest_boardloader.c',
'embed/projects/prodtest/cmd/prodtest_bootloader.c',
'embed/projects/prodtest/cmd/prodtest_button.c',
'embed/projects/prodtest/cmd/prodtest_display.c',
'embed/projects/prodtest/cmd/prodtest_prodtest.c',
'embed/projects/prodtest/cmd/prodtest_get_cpuid.c',
'embed/projects/prodtest/cmd/prodtest_haptic.c',
'embed/projects/prodtest/cmd/prodtest_help.c',
'embed/projects/prodtest/cmd/prodtest_optiga.c',
'embed/projects/prodtest/cmd/prodtest_otp_batch.c',
'embed/projects/prodtest/cmd/prodtest_otp_variant.c',
'embed/projects/prodtest/cmd/prodtest_ping.c',
'embed/projects/prodtest/cmd/prodtest_pmic.c',
'embed/projects/prodtest/cmd/prodtest_powerctl.c',
'embed/projects/prodtest/cmd/prodtest_reboot.c',
'embed/projects/prodtest/cmd/prodtest_rgbled.c',
'embed/projects/prodtest/cmd/prodtest_sdcard.c',
'embed/projects/prodtest/cmd/prodtest_sbu.c',
'embed/projects/prodtest/cmd/prodtest_touch.c',
'embed/projects/prodtest/cmd/prodtest_wpc.c',
]

if 'optiga' in FEATURES_AVAILABLE:
SOURCE_PRODTEST += [
'embed/projects/prodtest/optiga_prodtest.c',
]

env.Replace(
CAT='cat',
CP='cp',
Expand Down
2 changes: 1 addition & 1 deletion core/embed/io/haptic/drv2625/drv2625.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool haptic_init(void) {
haptic_driver_t *driver = &g_haptic_driver;

if (driver->initialized) {
return false;
return true;
}

memset(driver, 0, sizeof(haptic_driver_t));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Completely redesigned. See the updated documentation for details.
Loading

0 comments on commit 818e0a4

Please sign in to comment.