Skip to content

Commit f947c4c

Browse files
committed
feat(core/bootloader): stronger haptic effect on power on
[no changelog]
1 parent 3ca9525 commit f947c4c

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

core/embed/io/haptic/drv2625/drv2625.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
#define BOOTLOADER_ENTRY_EFFECT_AMPLITUDE 100
4242
// Duration of the bootloader entry effect
4343
#define BOOTLOADER_ENTRY_EFFECT_DURATION 300
44+
// Amplitude of the power on effect
45+
#define POWER_ON_EFFECT_AMPLITUDE 50
46+
// Duration of the power on effect
47+
#define POWER_ON_EFFECT_DURATION 50
4448

4549
// Actuator configuration
4650
#include HAPTIC_ACTUATOR
@@ -354,6 +358,9 @@ bool haptic_play(haptic_effect_t effect) {
354358
return haptic_play_rtp(BOOTLOADER_ENTRY_EFFECT_AMPLITUDE,
355359
BOOTLOADER_ENTRY_EFFECT_DURATION);
356360
break;
361+
case HAPTIC_POWER_ON:
362+
return haptic_play_rtp(POWER_ON_EFFECT_AMPLITUDE,
363+
POWER_ON_EFFECT_DURATION);
357364
default:
358365
break;
359366
}

core/embed/io/haptic/inc/io/haptic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ typedef enum {
2828
HAPTIC_HOLD_TO_CONFIRM = 1,
2929
// Bootloader entry
3030
HAPTIC_BOOTLOADER_ENTRY = 2,
31+
// Power on
32+
HAPTIC_POWER_ON = 3,
3133
} haptic_effect_t;
3234

3335
#ifdef KERNEL_MODE

core/embed/projects/bootloader/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static secbool boot_sequence(void) {
196196
}
197197
#ifdef USE_HAPTIC
198198
if (elapsed >= 500 && !haptic_played) {
199-
haptic_play(HAPTIC_BUTTON_PRESS);
199+
haptic_play(HAPTIC_POWER_ON);
200200
haptic_played = true;
201201
}
202202
#endif

0 commit comments

Comments
 (0)