What steps will reproduce the problem?
While using the component at45db on an micaz mote, if you use the command
copyPage with a destination page greater than or equal to AT45_PAGE_SIZE.
What is the expected output? What do you see instead?
The result of the command in all cases is the same: FAIL. If the destination
page is less than AT45_PAGE_SIZE, the operation do its work and the most times
return SUCCESS.
What version of the product are you using? On what operating system?
I am using the version "r5108" with header: "// $Id: At45dbP.nc,v 1.11
2010-06-29 22:07:43 scipio Exp $" on a XubunTOS virtual machine 2.1.
Please provide any additional information below.
I think the problem comes in lines from 394 to 399 at "At45dbP.nc" file,
because if you replace that lines for the following code, the problem seems to
be fixed:
#ifdef CHECKARGS
if (page >= AT45_MAX_PAGES || (offset >= AT45_PAGE_SIZE && req != R_COPY) ||
n > AT45_PAGE_SIZE || (offset + n > AT45_PAGE_SIZE && req != R_COPY) ||
(offset >= AT45_MAX_PAGES && req == R_COPY))
post taskFail();
else
#endif
with these lines I add an exception if the command is copyPage in order to not
always return FAIL if the destination page is greater than or equal to
AT45_PAGE_SIZE, instead of, it return FAIL if the destination page is greather
than or equal to AT45_MAX_PAGES.
Thanks for reading.
Enrique Castellanos.
Original issue reported on code.google.com by casor...@gmail.com on 23 Oct 2010 at 10:02
Original issue reported on code.google.com by
casor...@gmail.com
on 23 Oct 2010 at 10:02