mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-07 22:52:53 -04:00
GPIO: Fix apparent dumb bit-logic bug.
Not due to any observable incorrect behavior, but just noticing that the code, as previously written, should not work...
This commit is contained in:
parent
431aae333a
commit
ad9a63a666
1 changed files with 6 additions and 6 deletions
|
@ -37,12 +37,12 @@ struct PinConfig {
|
||||||
|
|
||||||
constexpr operator uint16_t() {
|
constexpr operator uint16_t() {
|
||||||
return
|
return
|
||||||
((~ifilt) << 7)
|
(((~ifilt) & 1) << 7)
|
||||||
| (input << 6)
|
| ((input & 1) << 6)
|
||||||
| (fast << 5)
|
| ((fast & 1) << 5)
|
||||||
| ((~pu) << 4)
|
| (((~pu) & 1) << 4)
|
||||||
| (pd << 3)
|
| ((pd & 1) << 3)
|
||||||
| (mode << 0);
|
| ((mode & 1) << 0);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
constexpr operator uint32_t() {
|
constexpr operator uint32_t() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue