Subversion Repositories idreammicro-arduino

Compare Revisions

Ignore whitespace Rev 17 → Rev 18

/trunk/libraries/Eeprom24C32_64/Eeprom24C32_64.cpp
2,7 → 2,7
* \brief EEPROM 24C32 / 24C64 library for Arduino
* \author Copyright (C) 2012 Julien Le Sech - www.idreammicro.com
* \version 1.0
* \date 20120203
* \date 20120218
*
* This file is part of the EEPROM 24C32 / 24C64 library for Arduino.
*
137,7 → 137,7
){
// Write first page if not aligned.
byte notAlignedLength = 0;
word pageOffset = address % EEPROM__PAGE_SIZE;
byte pageOffset = address % EEPROM__PAGE_SIZE;
if (pageOffset > 0)
{
notAlignedLength = EEPROM__PAGE_SIZE - pageOffset;
151,8 → 151,8
p_data += notAlignedLength;
 
// Write complete and aligned pages.
word pageCount = length / EEPROM__PAGE_SIZE;
for (word i = 0; i < pageCount; i++)
byte pageCount = length / EEPROM__PAGE_SIZE;
for (byte i = 0; i < pageCount; i++)
{
writePage(address, EEPROM__PAGE_SIZE, p_data);
address += EEPROM__PAGE_SIZE;
253,13 → 253,13
byte bufferCount = length / EEPROM__WR_BUFFER_SIZE;
for (byte i = 0; i < bufferCount; i++)
{
word offset = i * EEPROM__WR_BUFFER_SIZE;
byte offset = i * EEPROM__WR_BUFFER_SIZE;
writeBuffer(address + offset, EEPROM__WR_BUFFER_SIZE, p_data + offset);
}
 
// Write remaining bytes.
byte remainingBytes = length % EEPROM__WR_BUFFER_SIZE;
word offset = length - remainingBytes;
byte offset = length - remainingBytes;
writeBuffer(address + offset, remainingBytes, p_data + offset);
}
 
327,4 → 327,3
}
}
}