diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-11-29 11:30:25 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-11-29 11:30:25 +0000 |
commit | 24ca2d49fef526b95e6efcd3cdcbe38377ae4f02 (patch) | |
tree | cb2d74fe7beb4a8b08bed7b5916dedfd2f6cbb27 | |
parent | 70f3d8e933d57e703b978b2387b4781c6fb903ec (diff) | |
download | lufa-24ca2d49fef526b95e6efcd3cdcbe38377ae4f02.tar.gz lufa-24ca2d49fef526b95e6efcd3cdcbe38377ae4f02.tar.bz2 lufa-24ca2d49fef526b95e6efcd3cdcbe38377ae4f02.zip |
Bit-bang ISP in the AVRISP-MKII clone project needs to set MOSI pin to the MSB of the data byte on startup, not the LSB.
-rw-r--r-- | Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c index 2158f4de2..a6ec53600 100644 --- a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c +++ b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c @@ -243,7 +243,8 @@ uint8_t ISPTarget_TransferSoftSPIByte(const uint8_t Byte) SoftSPI_Data = Byte; SoftSPI_BitsRemaining = 8; - if (SoftSPI_Data & 0x01) + /* Set initial MOSI pin state according to the byte to be transferred */ + if (SoftSPI_Data & (1 << 7)) PORTB |= (1 << 2); else PORTB &= ~(1 << 2); |