Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103085743
packet.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 27, 04:27
Size
281 B
Mime Type
text/x-c
Expires
Sat, Mar 1, 04:27 (2 d)
Engine
blob
Format
Raw Data
Handle
24492911
Attached To
R6616 sbcp-uc
packet.c
View Options
#include "packet.h"
uint8_t
sbcp_compute_packet_cs
(
unsigned
int
*
buffer
){
uint16_t
psize
=
buffer
[
SBCP_PAYLOAD_SIZE_POS
]
&
0xff
;
uint16_t
i
;
uint8_t
cs
=
0
;
for
(
i
=
1
;
i
<
SBCP_HEADER_SIZE
+
psize
-
1
;
++
i
){
cs
+=
buffer
[
i
];
}
return
cs
;
}
Event Timeline
Log In to Comment