diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-11-29 11:30:25 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-11-29 11:30:25 +0000 |
| commit | bb617940b75b02f4e03ba485b955d79564d8a8cd (patch) | |
| tree | cb2d74fe7beb4a8b08bed7b5916dedfd2f6cbb27 /Projects/AVRISP-MKII/Lib | |
| parent | 6db4c7fe43568b17f51b18ced6648efe3892a714 (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1998 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/AVRISP-MKII/Lib')
| -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 2158f4de..a6ec5360 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); |
