Hello guys,
I have to convert this code to B4A.
----------------------------------------------------------------------------
------------------------------------------------------------------------------
Thanks
I have to convert this code to B4A.
----------------------------------------------------------------------------
B4X:
ushort Calc_CRC (uchar *Data, short Size)
{
ushort r=0, a, b;
short t;
for (t=0; t<Size; t++)
{
r+=(t*Data[t])+t;
}
a=r>>8; if (a==0x0D) a=0x0E;
b=r&0xFF; if (b==0x0D) b=0x0E;
a<<=8;
return a|b;
}
Thanks
Last edited: