comparison tests/cp_ping.py @ 3:e410832c3280

Issue of avr-ld. - For some unknown reason, avr-ld can not handle multiple objects well. - Fixed by compile all source at once.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 22 Feb 2009 01:40:36 +0800
parents f7c60e525801
children
comparison
equal deleted inserted replaced
2:abf221bf3ce4 3:e410832c3280
1 import struct 1 import struct
2 2
3 CP_CMD_PING = 1 3 CP_CMD_PING = 1
4 CP_CMD_PONG = 2
5 4
6 def csum_add(csum, c): 5 def csum_add(csum, c):
7 return (((csum << 3) | (csum >> 5)) ^ c) & 0xff 6 return (((csum << 3) | (csum >> 5)) ^ c) & 0xff
8 7
9 def cp_ping(seq, data): 8 def cp_ping(seq, data):