chiark / gitweb /
Better fix for T35
[cura.git] / Cura / avr_isp / chipDB.py
1 """
2 Database of AVR chips for avr_isp programming. Contains signatures and flash sizes from the AVR datasheets.
3 To support more chips add the relevant data to the avrChipDB list.
4 """
5 __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
6
7 avrChipDB = {
8         'ATMega1280': {
9                 'signature': [0x1E, 0x97, 0x03],
10                 'pageSize': 128,
11                 'pageCount': 512,
12         },
13         'ATMega2560': {
14                 'signature': [0x1E, 0x98, 0x01],
15                 'pageSize': 128,
16                 'pageCount': 1024,
17         },
18 }
19
20 def getChipFromDB(sig):
21         for chip in avrChipDB.values():
22                 if chip['signature'] == sig:
23                         return chip
24         return False
25