1 parent 95ea4f0 commit 2fe2a05Copy full SHA for 2fe2a05
1 file changed
stmhal/pin.c
@@ -287,10 +287,18 @@ STATIC mp_obj_t pin_obj_init(uint n_args, mp_obj_t *args) {
287
288
// enable the peripheral clock for the port of this pin
289
switch (self->port) {
290
+ #ifdef __GPIOA_CLK_ENABLE
291
case PORT_A: __GPIOA_CLK_ENABLE(); break;
292
+ #endif
293
+ #ifdef __GPIOB_CLK_ENABLE
294
case PORT_B: __GPIOB_CLK_ENABLE(); break;
295
296
+ #ifdef __GPIOC_CLK_ENABLE
297
case PORT_C: __GPIOC_CLK_ENABLE(); break;
298
299
+ #ifdef __GPIOD_CLK_ENABLE
300
case PORT_D: __GPIOD_CLK_ENABLE(); break;
301
302
#ifdef __GPIOE_CLK_ENABLE
303
case PORT_E: __GPIOE_CLK_ENABLE(); break;
304
#endif
0 commit comments