mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 17:24:21 +08:00

git-subtree-dir: plugins/USBPrinting git-subtree-mainline: 3823afd8cca1fe92b69082d51d0d50946b904e91 git-subtree-split: b28ca0881a6c2564f5447476f7b21de5645c10bd
26 lines
690 B
Python
26 lines
690 B
Python
"""
|
|
Database of AVR chips for avr_isp programming. Contains signatures and flash sizes from the AVR datasheets.
|
|
To support more chips add the relevant data to the avrChipDB list.
|
|
This is a python 3 conversion of the code created by David Braam for the Cura project.
|
|
"""
|
|
|
|
avrChipDB = {
|
|
'ATMega1280': {
|
|
'signature': [0x1E, 0x97, 0x03],
|
|
'pageSize': 128,
|
|
'pageCount': 512,
|
|
},
|
|
'ATMega2560': {
|
|
'signature': [0x1E, 0x98, 0x01],
|
|
'pageSize': 128,
|
|
'pageCount': 1024,
|
|
},
|
|
}
|
|
|
|
def getChipFromDB(sig):
|
|
for chip in avrChipDB.values():
|
|
if chip['signature'] == sig:
|
|
return chip
|
|
return False
|
|
|