mirror of
https://github.com/Dev-KATECH/ADM.git
synced 2026-05-17 09:53:59 +09:00
233 lines
4.1 KiB
Plaintext
233 lines
4.1 KiB
Plaintext
|
|
Marking local functions: BIT
|
|
|
|
|
|
Marking externally visible functions: Lin_Ip_MakeChecksumByte Lin_Ip_ProcessParity
|
|
|
|
|
|
Marking externally visible variables:
|
|
|
|
|
|
Reclaiming functions:
|
|
Reclaiming variables:
|
|
Clearing address taken flags:
|
|
Symbol table:
|
|
|
|
Lin_Ip_MakeChecksumByte/2 (Lin_Ip_MakeChecksumByte) @06985e00
|
|
Type: function definition analyzed
|
|
Visibility: externally_visible public
|
|
References:
|
|
Referring:
|
|
Availability: available
|
|
Function flags: body optimize_size
|
|
Called by:
|
|
Calls:
|
|
Lin_Ip_ProcessParity/1 (Lin_Ip_ProcessParity) @06985b60
|
|
Type: function definition analyzed
|
|
Visibility: externally_visible public
|
|
References:
|
|
Referring:
|
|
Availability: available
|
|
Function flags: body optimize_size
|
|
Called by:
|
|
Calls: BIT/0 BIT/0 BIT/0 BIT/0 BIT/0 BIT/0 BIT/0 BIT/0
|
|
BIT/0 (BIT) @069858c0
|
|
Type: function definition analyzed
|
|
Visibility: prevailing_def_ironly
|
|
References:
|
|
Referring:
|
|
Availability: local
|
|
Function flags: body local optimize_size
|
|
Called by: Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1 Lin_Ip_ProcessParity/1
|
|
Calls:
|
|
Lin_Ip_MakeChecksumByte (const uint8 * pBuffer, const uint8 u8SizeBuffer, const uint8 u8Pid)
|
|
{
|
|
uint16 checksum;
|
|
uint8 length;
|
|
uint8 D.4122;
|
|
|
|
<bb 2> :
|
|
# DEBUG BEGIN_STMT
|
|
# DEBUG BEGIN_STMT
|
|
checksum = 0;
|
|
# DEBUG BEGIN_STMT
|
|
if (u8Pid != 60)
|
|
goto <bb 3>; [INV]
|
|
else
|
|
goto <bb 7>; [INV]
|
|
|
|
<bb 3> :
|
|
if (u8Pid != 125)
|
|
goto <bb 4>; [INV]
|
|
else
|
|
goto <bb 7>; [INV]
|
|
|
|
<bb 4> :
|
|
if (u8Pid != 254)
|
|
goto <bb 5>; [INV]
|
|
else
|
|
goto <bb 7>; [INV]
|
|
|
|
<bb 5> :
|
|
if (u8Pid != 191)
|
|
goto <bb 6>; [INV]
|
|
else
|
|
goto <bb 7>; [INV]
|
|
|
|
<bb 6> :
|
|
# DEBUG BEGIN_STMT
|
|
checksum = (uint16) u8Pid;
|
|
goto <bb 8>; [INV]
|
|
|
|
<bb 7> :
|
|
# DEBUG BEGIN_STMT
|
|
checksum = 0;
|
|
|
|
<bb 8> :
|
|
# DEBUG BEGIN_STMT
|
|
length = 0;
|
|
goto <bb 12>; [INV]
|
|
|
|
<bb 9> :
|
|
# DEBUG BEGIN_STMT
|
|
_1 = (sizetype) length;
|
|
_2 = pBuffer + _1;
|
|
_3 = *_2;
|
|
_4 = (short unsigned int) _3;
|
|
checksum = checksum + _4;
|
|
# DEBUG BEGIN_STMT
|
|
if (checksum > 255)
|
|
goto <bb 10>; [INV]
|
|
else
|
|
goto <bb 11>; [INV]
|
|
|
|
<bb 10> :
|
|
# DEBUG BEGIN_STMT
|
|
checksum = checksum + 65281;
|
|
|
|
<bb 11> :
|
|
# DEBUG BEGIN_STMT
|
|
length.1_5 = length;
|
|
length = length.1_5 + 1;
|
|
|
|
<bb 12> :
|
|
# DEBUG BEGIN_STMT
|
|
if (length < u8SizeBuffer)
|
|
goto <bb 9>; [INV]
|
|
else
|
|
goto <bb 13>; [INV]
|
|
|
|
<bb 13> :
|
|
# DEBUG BEGIN_STMT
|
|
_6 = (unsigned char) checksum;
|
|
D.4122 = ~_6;
|
|
return D.4122;
|
|
|
|
}
|
|
|
|
|
|
Lin_Ip_ProcessParity (const uint8 u8Pid, const Lin_Ip_ParityActionType eTypeAction)
|
|
{
|
|
uint8 retVal;
|
|
uint8 u8CalPid;
|
|
uint8 D.4110;
|
|
unsigned char D.4100;
|
|
unsigned char iftmp.0;
|
|
|
|
<bb 2> :
|
|
# DEBUG BEGIN_STMT
|
|
u8CalPid = u8Pid & 63;
|
|
# DEBUG BEGIN_STMT
|
|
retVal = 255;
|
|
# DEBUG BEGIN_STMT
|
|
_1 = BIT (u8Pid, 0);
|
|
_2 = BIT (u8Pid, 1);
|
|
_3 = _1 ^ _2;
|
|
_4 = BIT (u8Pid, 2);
|
|
_5 = _3 ^ _4;
|
|
_6 = BIT (u8Pid, 4);
|
|
_7 = _5 ^ _6;
|
|
_8 = _7 << 6;
|
|
_9 = BIT (u8Pid, 1);
|
|
_10 = BIT (u8Pid, 3);
|
|
_11 = _9 ^ _10;
|
|
_12 = BIT (u8Pid, 4);
|
|
_13 = _11 ^ _12;
|
|
_14 = BIT (u8Pid, 5);
|
|
_15 = _13 ^ _14;
|
|
_16 = _15 & 1;
|
|
if (_16 == 0)
|
|
goto <bb 3>; [INV]
|
|
else
|
|
goto <bb 4>; [INV]
|
|
|
|
<bb 3> :
|
|
iftmp.0 = 128;
|
|
goto <bb 5>; [INV]
|
|
|
|
<bb 4> :
|
|
iftmp.0 = 0;
|
|
|
|
<bb 5> :
|
|
D.4100 = iftmp.0 | _8;
|
|
u8CalPid = D.4100 | u8CalPid;
|
|
# DEBUG BEGIN_STMT
|
|
if (eTypeAction == 0)
|
|
goto <bb 6>; [INV]
|
|
else
|
|
goto <bb 9>; [INV]
|
|
|
|
<bb 6> :
|
|
# DEBUG BEGIN_STMT
|
|
if (u8Pid != u8CalPid)
|
|
goto <bb 7>; [INV]
|
|
else
|
|
goto <bb 8>; [INV]
|
|
|
|
<bb 7> :
|
|
# DEBUG BEGIN_STMT
|
|
retVal = 255;
|
|
goto <bb 11>; [INV]
|
|
|
|
<bb 8> :
|
|
# DEBUG BEGIN_STMT
|
|
retVal = u8Pid & 63;
|
|
goto <bb 11>; [INV]
|
|
|
|
<bb 9> :
|
|
# DEBUG BEGIN_STMT
|
|
if (eTypeAction == 1)
|
|
goto <bb 10>; [INV]
|
|
else
|
|
goto <bb 11>; [INV]
|
|
|
|
<bb 10> :
|
|
# DEBUG BEGIN_STMT
|
|
retVal = u8CalPid;
|
|
|
|
<bb 11> :
|
|
# DEBUG BEGIN_STMT
|
|
# DEBUG BEGIN_STMT
|
|
D.4110 = retVal;
|
|
return D.4110;
|
|
|
|
}
|
|
|
|
|
|
BIT (uint8 A, uint8 B)
|
|
{
|
|
uint8 D.4112;
|
|
|
|
<bb 2> :
|
|
# DEBUG BEGIN_STMT
|
|
_1 = (int) A;
|
|
_2 = (int) B;
|
|
_3 = _1 >> _2;
|
|
_4 = (unsigned char) _3;
|
|
D.4112 = _4 & 1;
|
|
return D.4112;
|
|
|
|
}
|
|
|
|
|