I've always assumed the actual io command (0x02425818) would be different for different devices, at least it seems to me it is for flushes at any rate.
Going by types.h a 64 bit is either u64 or s64, though signed 64bit should be long long. Are you sure you retyped all the buf/pbuf etc? Is there any particular reason to have that for loop on memd in there as it braces no code? I'd try my own ideas, but I lack anything over 4G.
Urm, what I meant when I said use 64bit ints is to keep the buf as is (leave as 32bit ints) then when doing the calculation cast each element to a 64bit int.
TyRaNiD wrote:Urm, what I meant when I said use 64bit ints is to keep the buf as is (leave as 32bit ints) then when doing the calculation cast each element to a 64bit int.
When I divide u64 by a smaller value like (u64)1024 it crashes.
...
Even if I assign the result to a u64.
However if I have something like (u64var1 - u64var2)/small then it works. Presumably since the numerator equates to a 32bit value, like what usually occurs when using the RTC timer values in calculations.