Skip to content

Commit

Permalink
* pinmap support B26 B27
Browse files Browse the repository at this point in the history
  • Loading branch information
lxowalle committed Jan 10, 2025
1 parent 90fc41c commit 2e7fb36
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions components/peripheral/port/maixcam/maix_pinmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ namespace maix::peripheral::pinmap
"A28",
"A29",
"B3",
"B26",
"B27",
"C2",
"P18",
"P19",
Expand Down Expand Up @@ -246,6 +248,20 @@ namespace maix::peripheral::pinmap
"ADC"
};
}
else if (pin == "B26")
{
return std::vector<std::string>{
"GPIOB26",
"PWM14"
};
}
else if (pin == "B27")
{
return std::vector<std::string>{
"GPIOB27",
"PWM15"
};
}
else if (pin == "C2")
{
return std::vector<std::string>{
Expand Down Expand Up @@ -581,6 +597,28 @@ namespace maix::peripheral::pinmap
set_pinmux(0x030010F8, 3);
return err::ERR_NONE;
}
else if (pin == "B26")
{
if (func == "GPIOB26") {
set_pinmux(0x03001130, 3);
} else if (func == "PWM14") {
set_pinmux(0x03001130, 4);
} else {
return err::ERR_ARGS;
}
return err::ERR_NONE;
}
else if (pin == "B27")
{
if (func == "GPIOB27") {
set_pinmux(0x0300112C, 3);
} else if (func == "PWM15") {
set_pinmux(0x0300112C, 4);
} else {
return err::ERR_ARGS;
}
return err::ERR_NONE;
}
else if (pin == "C2")
{
if (func == "GPIOC2")
Expand Down

0 comments on commit 2e7fb36

Please sign in to comment.