Skip to content

Commit

Permalink
hc32f460: Adding support for 100pin version of H32F460 (#6488)
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Giraudon <[email protected]>
  • Loading branch information
ggiraudon authored Mar 19, 2024
1 parent 78a15b6 commit 235b75b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hc32f460/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 16);
DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 16);
DECL_ENUMERATION_RANGE("pin", "PC0", GPIO('C', 0), 16);
DECL_ENUMERATION_RANGE("pin", "PD2", GPIO('D', 2), 1);
DECL_ENUMERATION_RANGE("pin", "PD0", GPIO('D', 0), 16);
DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 16);
DECL_ENUMERATION_RANGE("pin", "PH2", PortH * 16 + 2, 1); // H: special case


Expand Down
16 changes: 16 additions & 0 deletions src/hc32f460/hard_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ static const struct gpio_pwm_info pwm_mapping[] = {
{GPIO('C',14), 4, TimeraCh5},
{GPIO('C',15), 4, TimeraCh6},
{GPIO('D', 2), 2, TimeraCh4},
{GPIO('D',12), 4, TimeraCh1},
{GPIO('D',13), 4, TimeraCh2},
{GPIO('D',14), 4, TimeraCh3},
{GPIO('D',15), 4, TimeraCh4},
{GPIO('E', 2), 3, TimeraCh5},
{GPIO('E', 3), 3, TimeraCh6},
{GPIO('E', 4), 3, TimeraCh7},
{GPIO('E', 5), 3, TimeraCh8},
{GPIO('E', 8), 1, TimeraCh5},
{GPIO('E', 9), 1, TimeraCh1},
{GPIO('E',10), 1, TimeraCh6},
{GPIO('E',11), 1, TimeraCh2},
{GPIO('E',12), 1, TimeraCh7},
{GPIO('E',13), 1, TimeraCh3},
{GPIO('E',14), 1, TimeraCh4},
{GPIO('E',15), 1, TimeraCh8},
};


Expand Down

0 comments on commit 235b75b

Please sign in to comment.