From 4e7bbc655ba23c9d0d94f5d2c6ec34875f151104 Mon Sep 17 00:00:00 2001 From: mooinglemur Date: Tue, 2 Apr 2024 12:35:29 -0700 Subject: [PATCH] sdcard: autotx fix bit in wrong position --- src/vera/vera_spi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vera/vera_spi.cpp b/src/vera/vera_spi.cpp index 1969e04..04dcdaf 100644 --- a/src/vera/vera_spi.cpp +++ b/src/vera/vera_spi.cpp @@ -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; } @@ -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; } @@ -91,7 +91,7 @@ void vera_spi_write(uint8_t reg, uint8_t value) sdcard_select(ss); } } - autotx = !!(value & 8); + autotx = !!(value & 4); break; } }