Skip to content

Commit aa12996

Browse files
hansemroutzig
authored andcommitted
HT32: TIMv1: gpt_lld_init: Fix reference to GPTD_BFTM1
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.
1 parent 09ba7e6 commit aa12996

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: os/hal/ports/HT32/LLD/TIMv1/hal_gpt_lld.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void gpt_lld_init(void) {
101101
#endif
102102
#if HT32_GPT_USE_BFTM1 == TRUE
103103
gptObjectInit(&GPTD_BFTM1);
104-
GPTD_BFTM0.BFTM = BFTM1;
104+
GPTD_BFTM1.BFTM = BFTM1;
105105
#endif
106106
}
107107

0 commit comments

Comments
 (0)