Skip to content

Commit

Permalink
Fix pinmux
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Jan 30, 2025
1 parent 87ad82a commit 7b70a09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions capes/drivers/bb64/src/Pin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,13 @@ Pin& Pin::modesFromBall(const std::string& b) {
}
return *this;
}
Pin& Pin::modesFromBallNoConflicts(const std::string& b) {
std::string bn = b.empty() ? balls.front() : b;
auto& ball = Ball::findBall(bn);
for (auto& m : ball.modesetCommands) {
if (m.first != "reset" && modes.find(m.first) == modes.end()) {
addMode(m.first, bn, m.first);
}
}
return *this;
}
1 change: 1 addition & 0 deletions capes/drivers/bb64/src/Pin.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Pin {
return *this;
}
Pin& modesFromBall(const std::string& b = "");
Pin& modesFromBallNoConflicts(const std::string& b = "");

const Pin& query() const;
const Pin& listModes() const;
Expand Down
2 changes: 1 addition & 1 deletion capes/drivers/bb64/src/PocketBeagle2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void InitPocketBeagle2() {
Pin::addPin("P2_28").addBall("AB24").modesFromBall();
Pin::addPin("P2_29").addBall("M22").addBall("A14").modesFromBall("M22");
Pin::addPin("P2_30").addBall("AA24").modesFromBall();
Pin::addPin("P2_31").addBall("AA18").addBall("A13").modesFromBall("AA18");
Pin::addPin("P2_31").addBall("AA18").addBall("A13").modesFromBall("A13").modesFromBallNoConflicts("AA18");
Pin::addPin("P2_32").addBall("AB25").modesFromBall();
Pin::addPin("P2_33").addBall("AA25").modesFromBall().addMode("uart", "AA25", "uart5_tx");
Pin::addPin("P2_34").addBall("AA21").modesFromBall();
Expand Down

0 comments on commit 7b70a09

Please sign in to comment.