Mercurial > avr_jtag
diff py_avrjtag/cmd_proto.py @ 10:cc106f278d7d
Get identify of components
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 24 Feb 2009 13:32:04 +0800 |
parents | 074e860d7d31 |
children |
line wrap: on
line diff
--- a/py_avrjtag/cmd_proto.py Sun Feb 22 22:43:26 2009 +0800 +++ b/py_avrjtag/cmd_proto.py Tue Feb 24 13:32:04 2009 +0800 @@ -20,6 +20,8 @@ FRAME_OVERHEAD = 5 def __init__(self, seq=0, code=0, data=''): + if len(data) >= 255: + raise ValueError, 'data length (%d) >= 255' % (len(data)) self.seq = seq self.code = code self.data = data