Subversion Repositories idreammicro-arduino

Compare Revisions

Ignore whitespace Rev 19 → Rev 20

/trunk/libraries/Eeprom24C512/Eeprom24C512.cpp
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;
214,8 → 214,8
word length,
byte* p_data
){
byte bufferCount = length / EEPROM__RD_BUFFER_SIZE;
for (byte i = 0; i < bufferCount; i++)
word bufferCount = length / EEPROM__RD_BUFFER_SIZE;
for (word i = 0; i < bufferCount; i++)
{
word offset = i * EEPROM__RD_BUFFER_SIZE;
readBuffer(address + offset, EEPROM__RD_BUFFER_SIZE, p_data + offset);
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);
}