Skip to content

Commit 1591497

Browse files
authored
fix ch32x035 GPIO: pin_16, pin_17, ..., pin_23 (#18)
fix it
1 parent f187ac1 commit 1591497

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: cores/arduino/ch32/pinmap.c

+4
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ void pin_function(PinName pin, int function)
166166

167167
}
168168

169+
#if defined(CH32X035)
170+
GPIO_InitStructure.GPIO_Pin = ch_pinx; // fixed by Ngo Hung Cuong: pin_16, 17, ..., 23
171+
#else
169172
GPIO_InitStructure.GPIO_Pin = (uint16_t) ch_pinx;
173+
#endif
170174
GPIO_Init(gpio, &GPIO_InitStructure);
171175
}
172176

0 commit comments

Comments
 (0)