Skip to content

NewEEPROMClass - wrong use of ARIADNE_SIGPOS [ EEPROM_IMG_STAT @ pos 2 ] #25

@hagaigold

Description

@hagaigold

the code below seem wrong to me.
ARIADNE_SIGPOS which is the same as EEPROM_IMG_STAT from neteeprom.h, use as status, if the image uploaded by the booloader is OK or not.

While in the below code, it look like it is used as if the ARIADNE boolader itself is been used... in the system, and if not use all the EEPROM (start from offset 0).

byw: the ARIADNE_OFFSET also seem not right. in neteeprom.h, last used eeprom address is 63.

NewEEPROM.h:

#define ARIADNE_SIGPOS (0x02)
#define ARIADNE_SIGVAL (0xEE)
#define ARIADNE_OFFSET (0x40)
#define NO_OFFSET      (0x00)

NewEEPROM.cpp:

NewEEPROMClass::NewEEPROMClass(void)
{
	if(read(ARIADNE_SIGPOS, 0) == ARIADNE_SIGVAL) _offset = ARIADNE_OFFSET;
	else _offset = NO_OFFSET;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions