Skip to content

Commit 0b968fc

Browse files
fix errorhandler in input capture interrupt callback (#622)
* fix: make dummy have invalid channel nº for rising, falling * add changeset for this pr * formatting
1 parent 4ab7fe3 commit 0b968fc

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changesets/hotfix-inputcapture.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
release: patch
2+
summary: input capture hotfix for errorhandler
3+
4+
fix: make dummy have invalid channel nº for rising, falling

Src/HALAL/Models/TimerDomain/TimerDomain.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ TIM_HandleTypeDef htim24;
2424
void (*TimerDomain::callbacks[TimerDomain::max_instances])(void*) = {nullptr};
2525
void* TimerDomain::callback_data[TimerDomain::max_instances] = {nullptr};
2626

27-
TimerDomain::InputCaptureInfo input_capture_info_dummy = {0};
27+
TimerDomain::InputCaptureInfo input_capture_info_dummy = {
28+
.channel_rising = 0xFF, // any value that isn't possible here
29+
.channel_falling = 0xFF, // any value that isn't possible here
30+
};
2831

2932
TimerDomain::InputCaptureInfo* TimerDomain::input_capture_info[max_instances]
3033
[input_capture_channels] = {

0 commit comments

Comments
 (0)