aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Board/STK525/Dataflash.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-02-01 10:09:18 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-02-01 10:09:18 +0000
commit2ae397dc2f6398cadbb228108e826be170548e61 (patch)
treead1cb6cbc145a0a8222356536ba5012ec91818f3 /LUFA/Drivers/Board/STK525/Dataflash.h
parent9e7ffcb014d08d9f541cc8000b34f600b437a78e (diff)
downloadlufa-2ae397dc2f6398cadbb228108e826be170548e61.tar.gz
lufa-2ae397dc2f6398cadbb228108e826be170548e61.tar.bz2
lufa-2ae397dc2f6398cadbb228108e826be170548e61.zip
Fixed STK525 Dataflash driver using incorrect bit-shifting for Dataflash addresses (thanks to Tim Mitchell).
Diffstat (limited to 'LUFA/Drivers/Board/STK525/Dataflash.h')
-rw-r--r--LUFA/Drivers/Board/STK525/Dataflash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/Board/STK525/Dataflash.h b/LUFA/Drivers/Board/STK525/Dataflash.h
index db78a7b3e..d779f7407 100644
--- a/LUFA/Drivers/Board/STK525/Dataflash.h
+++ b/LUFA/Drivers/Board/STK525/Dataflash.h
@@ -106,8 +106,8 @@
*/
static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
{
- Dataflash_SendByte(PageAddress >> 5);
- Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
+ Dataflash_SendByte(PageAddress >> 6);
+ Dataflash_SendByte((PageAddress << 2) | (BufferByte >> 8));
Dataflash_SendByte(BufferByte);
}