Skip to content

Commit

Permalink
HT32: TIMv1: gpt_lld_init: Fix reference to GPTD_BFTM1
Browse files Browse the repository at this point in the history
Fixes issue where GPTD_BFTM0 would point to BFTM1 when
HT32_GPT_USE_BFTM0 and HT32_GPT_USE_BFTM1 are defined True (and leaving
GPTD_BFTM1 unused).

Additionally, this fixes undeclared variable warning when only
HT32_GPT_USE_BFTM1 is defined True.
  • Loading branch information
hansemro authored and utzig committed Oct 26, 2022
1 parent 09ba7e6 commit aa12996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/hal/ports/HT32/LLD/TIMv1/hal_gpt_lld.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void gpt_lld_init(void) {
#endif
#if HT32_GPT_USE_BFTM1 == TRUE
gptObjectInit(&GPTD_BFTM1);
GPTD_BFTM0.BFTM = BFTM1;
GPTD_BFTM1.BFTM = BFTM1;
#endif
}

Expand Down

0 comments on commit aa12996

Please sign in to comment.