Skip to content

Commit

Permalink
sdcard: autotx fix bit in wrong position (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
mooinglemur authored Apr 3, 2024
1 parent 5d9dc27 commit 09c62d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vera/vera_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ uint8_t debug_vera_spi_read(uint8_t reg)
{
switch (reg) {
case 0: return received_byte;
case 1: return busy << 7 | autotx << 3 | (ss ? 1 : 0);
case 1: return busy << 7 | autotx << 2 | (ss ? 1 : 0);
}
return 0;
}
Expand All @@ -68,7 +68,7 @@ uint8_t vera_spi_read(uint8_t reg)
}
return received_byte;
case 1:
return busy << 7 | autotx << 3 | (ss ? 1 : 0);
return busy << 7 | autotx << 2 | (ss ? 1 : 0);
}
return 0;
}
Expand All @@ -91,7 +91,7 @@ void vera_spi_write(uint8_t reg, uint8_t value)
sdcard_select(ss);
}
}
autotx = !!(value & 8);
autotx = !!(value & 4);
break;
}
}

0 comments on commit 09c62d1

Please sign in to comment.