Skip to content

Commit

Permalink
fix ch32x035 GPIO: pin_16, pin_17, ..., pin_23 (#18)
Browse files Browse the repository at this point in the history
fix it
  • Loading branch information
NgoHungCuong authored Oct 16, 2023
1 parent f187ac1 commit 1591497
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cores/arduino/ch32/pinmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ void pin_function(PinName pin, int function)

}

#if defined(CH32X035)
GPIO_InitStructure.GPIO_Pin = ch_pinx; // fixed by Ngo Hung Cuong: pin_16, 17, ..., 23
#else
GPIO_InitStructure.GPIO_Pin = (uint16_t) ch_pinx;
#endif
GPIO_Init(gpio, &GPIO_InitStructure);
}

Expand Down

0 comments on commit 1591497

Please sign in to comment.