mirror of https://github.com/rusefi/openblt.git
Refs #1642. Added typecasts that are needed for 8- and 16-bit microcontrollers.
git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@1008 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
parent
b42fd64de5
commit
7d53c7c7be
|
@ -470,15 +470,15 @@ static blt_int32u XcpGetOrderedLong(blt_int8u const * data)
|
|||
blt_int32u result = 0;
|
||||
|
||||
#if (BOOT_CPU_BYTE_ORDER_MOTOROLA == 0)
|
||||
result |= (blt_int32u) data[0];
|
||||
result |= (blt_int32u)(data[1] << 8);
|
||||
result |= (blt_int32u)(data[2] << 16);
|
||||
result |= (blt_int32u)(data[3] << 24);
|
||||
result |= (blt_int32u)data[0];
|
||||
result |= (blt_int32u)((blt_int32u)data[1] << 8);
|
||||
result |= (blt_int32u)((blt_int32u)data[2] << 16);
|
||||
result |= (blt_int32u)((blt_int32u)data[3] << 24);
|
||||
#else
|
||||
result |= (blt_int32u) data[3];
|
||||
result |= (blt_int32u)(data[2] << 8);
|
||||
result |= (blt_int32u)(data[1] << 16);
|
||||
result |= (blt_int32u)(data[0] << 24);
|
||||
result |= (blt_int32u)data[3];
|
||||
result |= (blt_int32u)((blt_int32u)data[2] << 8);
|
||||
result |= (blt_int32u)((blt_int32u)data[1] << 16);
|
||||
result |= (blt_int32u)((blt_int32u)data[0] << 24);
|
||||
#endif
|
||||
/* Give the result back to the caller. */
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue