summaryrefslogtreecommitdiff
path: root/decoders/avr_isp/pd.py
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-07-28 10:51:32 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2012-07-28 23:39:47 +0200
commit77adad943111ab064f01838033dc9c94152f46c7 (patch)
treef7b0f06db048d66f38085a83c95c5ec01a118531 /decoders/avr_isp/pd.py
parent3bd76451f01dface8df58828a2bbc242d3391db9 (diff)
downloadlibsigrokdecode-77adad943111ab064f01838033dc9c94152f46c7.tar.gz
libsigrokdecode-77adad943111ab064f01838033dc9c94152f46c7.zip
srd: avr_isp: Factor out part numbers/names to part.py.
Diffstat (limited to 'decoders/avr_isp/pd.py')
-rw-r--r--decoders/avr_isp/pd.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/decoders/avr_isp/pd.py b/decoders/avr_isp/pd.py
index be6c190..4b496e0 100644
--- a/decoders/avr_isp/pd.py
+++ b/decoders/avr_isp/pd.py
@@ -21,29 +21,7 @@
# AVR ISP protocol decoder
import sigrokdecode as srd
-
-# Device code addresses:
-# 0x00: vendor code, 0x01: part family + flash size, 0x02: part number
-
-# Vendor code
-vendor_code = {
- 0x1e: 'Atmel',
- 0x00: 'Device locked',
-}
-
-# (Part family + flash size, part number)
-part = {
- (0x90, 0x01): 'AT90S1200',
- (0x91, 0x01): 'AT90S2313',
- (0x92, 0x01): 'AT90S4414',
- (0x92, 0x05): 'ATmega48', # 4kB flash
- (0x93, 0x01): 'AT90S8515',
- (0x93, 0x0a): 'ATmega88', # 8kB flash
- (0x94, 0x06): 'ATmega168', # 16kB flash
- (0xff, 0xff): 'Device code erased, or target missing',
- (0x01, 0x02): 'Device locked',
- # TODO: Lots more entries.
-}
+from .parts import *
VENDOR_CODE_ATMEL = 0x1e